https://github.com/united-drivers/postal
:postbox: international postal address normalizer and renderer
https://github.com/united-drivers/postal
address normalizer postal-code
Last synced: about 1 month ago
JSON representation
:postbox: international postal address normalizer and renderer
- Host: GitHub
- URL: https://github.com/united-drivers/postal
- Owner: united-drivers
- License: apache-2.0
- Created: 2018-02-03T08:46:49.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-07T21:20:55.000Z (about 8 years ago)
- Last Synced: 2024-06-20T08:07:53.908Z (over 1 year ago)
- Topics: address, normalizer, postal-code
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# postal
:postbox: international postal address normalizer and renderer
[](https://circleci.com/gh/united-drivers/postal)
[](https://godoc.org/github.com/united-drivers/postal)
[](https://goreportcard.com/report/github.com/united-drivers/postal)
[](https://github.com/united-drivers/postal/blob/master/LICENSE)
[](https://github.com/united-drivers/postal/releases)
## Usage
Install with `go get github.com/united-drivers/postal`
```go
import "github.com/united-drivers/postal"
address := postal.Address{
HouseNumber: "96",
Road: "Boulevard Bessières",
Suburb: "Épinettes",
CityDistrict: "17th Arrondissement",
County: "Paris",
State: "Ile-de-France",
Country: "France",
PostCode: "75017",
CountryCode: "fr",
}
fmt.Println(address.Short()) // 96 Boulevard Bessières, Paris
fmt.Println(address.Long()) // 96 Boulevard Bessières 75017 Paris, France
fmt.Println(address.Full()) // 96, Boulevard Bessières, Épinettes, 17th Arrondissement, Paris, Ile-de-France, 75017, France
```
More usage on [GoDoc](https://godoc.org/github.com/united-drivers/postal), or in the [test file](https://github.com/united-drivers/postal/blob/master/address_test.go).
## License
[Apache 2.0](https://github.com/united-drivers/postal/blob/master/LICENSE)