forked from brianvoe/gofakeit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
celebrity.go
62 lines (50 loc) · 2.18 KB
/
celebrity.go
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package gofakeit
// CelebrityActor will generate a random celebrity actor
func CelebrityActor() string { return celebrityActor(GlobalFaker) }
// CelebrityActor will generate a random celebrity actor
func (f *Faker) CelebrityActor() string { return celebrityActor(f) }
func celebrityActor(f *Faker) string { return getRandValue(f, []string{"celebrity", "actor"}) }
// CelebrityBusiness will generate a random celebrity business person
func CelebrityBusiness() string { return celebrityBusiness(GlobalFaker) }
// CelebrityBusiness will generate a random celebrity business person
func (f *Faker) CelebrityBusiness() string { return celebrityBusiness(f) }
func celebrityBusiness(f *Faker) string {
return getRandValue(f, []string{"celebrity", "business"})
}
// CelebritySport will generate a random celebrity sport person
func CelebritySport() string { return celebritySport(GlobalFaker) }
// CelebritySport will generate a random celebrity sport person
func (f *Faker) CelebritySport() string { return celebritySport(f) }
func celebritySport(f *Faker) string { return getRandValue(f, []string{"celebrity", "sport"}) }
func addCelebrityLookup() {
AddFuncLookup("celebrityactor", Info{
Display: "Celebrity Actor",
Category: "celebrity",
Description: "Famous person known for acting in films, television, or theater",
Example: "Brad Pitt",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return celebrityActor(f), nil
},
})
AddFuncLookup("celebritybusiness", Info{
Display: "Celebrity Business",
Category: "celebrity",
Description: "High-profile individual known for significant achievements in business or entrepreneurship",
Example: "Elon Musk",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return celebrityBusiness(f), nil
},
})
AddFuncLookup("celebritysport", Info{
Display: "Celebrity Sport",
Category: "celebrity",
Description: "Famous athlete known for achievements in a particular sport",
Example: "Michael Phelps",
Output: "string",
Generate: func(f *Faker, m *MapParams, info *Info) (any, error) {
return celebritySport(f), nil
},
})
}