blob: 9c45fb3aa4656a2dd7044fce581b00bfb37ddf71 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package fake
// Brand generates brand name
func Brand() string {
return Company()
}
// ProductName generates product name
func ProductName() string {
productName := lookup(lang, "adjectives", true) + " " + lookup(lang, "nouns", true)
if r.Intn(2) == 1 {
productName = lookup(lang, "adjectives", true) + " " + productName
}
return productName
}
// Product generates product title as brand + product name
func Product() string {
return Brand() + " " + ProductName()
}
// Model generates model name that consists of letters and digits, optionally with a hyphen between them
func Model() string {
seps := []string{"", " ", "-"}
return CharactersN(r.Intn(3)+1) + seps[r.Intn(len(seps))] + Digits()
}
|