Documentation ¶
Overview ¶
Package address contains functionality to generate addresses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
Generator is a generator of addresses.
func (*Generator) Random ¶
Random generates a random address. The address will be in one of the following formats with equal probabilities:
- 1 line address: 222 XXX StreetSuffix PostCode City Country
- 2 lines address: 111 XXX House XXX StreetSuffix PostCode City Country
Where: 222 is a random number between [1, 200] 111 is a random number between [1, 100] XXX is a random noun StreetSuffix is a street suffix, eg.: Road, Street, Place etc. PostCode is a random post code. If the data configuration file contains a list of postcodes, it is chosen randomly among them. Otherwise, it is generated based on the country. City is a random city.
Click to show internal directories.
Click to hide internal directories.