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) } }
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)) }
func (addr *Address) ZipCode() string { zipFormat := common.Choose(zipFormats, addr.rand) return common.Numerify(zipFormat, numerifyPattern, addr.rand) }