Documentation
¶
Overview ¶
faker generates fake data in various languages.
Index ¶
- Variables
- type Faker
- func (f *Faker) CellPhoneNumber() string
- func (f *Faker) Characters(count int) string
- func (f *Faker) City() string
- func (f *Faker) CityPrefix() string
- func (f *Faker) CitySuffix() string
- func (f *Faker) CompanyBs() string
- func (f *Faker) CompanyCatchPhrase() string
- func (f *Faker) CompanyName() string
- func (f *Faker) CompanySuffix() string
- func (f *Faker) Country() string
- func (f *Faker) DomainName() string
- func (f *Faker) DomainSuffix() string
- func (f *Faker) DomainWord() string
- func (f *Faker) Email() string
- func (f *Faker) FirstName() string
- func (f *Faker) FreeEmail() string
- func (f *Faker) IPv4Address() net.IP
- func (f *Faker) IPv6Address() net.IP
- func (f *Faker) JobTitle() string
- func (f *Faker) LastName() string
- func (f *Faker) Latitude() float64
- func (f *Faker) Longitude() float64
- func (f *Faker) Name() string
- func (f *Faker) NamePrefix() string
- func (f *Faker) NameSuffix() string
- func (f *Faker) Paragraph(sentences int, supplemental bool) string
- func (f *Faker) Paragraphs(count int, supplemental bool) []string
- func (f *Faker) PhoneNumber() string
- func (f *Faker) PostCode() string
- func (f *Faker) SafeEmail() string
- func (f *Faker) SecondaryAddress() string
- func (f *Faker) Sentence(words int, supplemental bool) string
- func (f *Faker) Sentences(count int, supplemental bool) []string
- func (f *Faker) State() string
- func (f *Faker) StateAbbr() string
- func (f *Faker) StreetAddress() string
- func (f *Faker) StreetName() string
- func (f *Faker) StreetSuffix() string
- func (f *Faker) URL() string
- func (f *Faker) UserName() string
- func (f *Faker) Words(count int, supplemental bool) []string
- type Rand
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Dict = dict
You can add your own translations and words to this dictionary. It's a map[string]map[string][]string. For example:
faker.Dict["en"]["company.suffix"] = []string{ "Inc", "and Sons", "LLC", "Group", }
Functions ¶
This section is empty.
Types ¶
type Faker ¶
func (*Faker) CellPhoneNumber ¶
func (*Faker) Characters ¶
func (*Faker) CityPrefix ¶
func (*Faker) CitySuffix ¶
func (*Faker) CompanyCatchPhrase ¶
func (*Faker) CompanyName ¶
func (*Faker) CompanySuffix ¶
func (*Faker) DomainName ¶
func (*Faker) DomainSuffix ¶
func (*Faker) DomainWord ¶
func (*Faker) IPv4Address ¶
func (*Faker) IPv6Address ¶
func (*Faker) Name ¶
Name returns a random personal name in various formats.
Example ¶
fake, _ := New("en") fake.Rand = rand.New(rand.NewSource(42)) fmt.Println(fake.Name())
Output: Adriana Crona
func (*Faker) NamePrefix ¶
func (*Faker) NameSuffix ¶
func (*Faker) PhoneNumber ¶
func (*Faker) SecondaryAddress ¶
func (*Faker) StreetAddress ¶
func (*Faker) StreetName ¶
func (*Faker) StreetSuffix ¶
Click to show internal directories.
Click to hide internal directories.