Пример #1
0
func (addr *Address) Address2() string {
	switch addr.rand.Intn(3) {
	case 0:
		return ""
	default:
		addr2Prefix := common.Choose(address2Prefixes, addr.rand)
		return common.Numerify(addr2Prefix, numerifyPattern, addr.rand)
	}
}
Пример #2
0
func (c *Company) Name() string {
	switch c.rand.Intn(3) {
	case 0:
		return fmt.Sprintf("%s %s", c.namer.LastName(), common.Choose(companySuffixes, c.rand))
	case 1:
		return fmt.Sprint(c.namer.LastName(), "-", c.namer.LastName())
	default:
		return fmt.Sprintf("%s, %s and %s", c.namer.LastName(), c.namer.LastName(),
			c.namer.LastName())
	}
}
Пример #3
0
func (addr *Address) Address1() string {
	streetName := ""
	switch addr.rand.Intn(2) {
	case 0:
		streetName = addr.namer.LastName()
	default:
		streetName = addr.namer.FirstName()
	}

	streetNum := common.Numerify("####", numerifyPattern, addr.rand)
	return fmt.Sprint(streetNum, " ", streetName, " ", common.Choose(streetSuffixes, addr.rand))
}
Пример #4
0
func (e *Email) Email() string {
	domainWord := formatDomainWord(e.company.Name())
	domainSuffix := common.Choose(domainSuffixes, e.rand)
	return fmt.Sprintf("%s@%s.%s", e.UserName(), domainWord, domainSuffix)
}
Пример #5
0
func (n *Namer) Suffix() string {
	return common.Choose(nameSuffixes, n.rand)
}
Пример #6
0
func (n *Namer) Prefix() string {
	return common.Choose(namePrefixes, n.rand)
}
Пример #7
0
func (n *Namer) LastName() string {
	return common.Choose(lastNames, n.rand)
}
Пример #8
0
func (n *Namer) FirstName() string {
	return common.Choose(firstNames, n.rand)
}
Пример #9
0
func (addr *Address) citySuffix() string {
	return common.Choose(citySuffixes, addr.rand)
}
Пример #10
0
func (addr *Address) ZipCode() string {
	zipFormat := common.Choose(zipFormats, addr.rand)
	return common.Numerify(zipFormat, numerifyPattern, addr.rand)
}
Пример #11
0
func (addr *Address) StateAbbr() string {
	return common.Choose(stateAbbrs, addr.rand)
}