products.go

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