Skip to content

📮 international postal address normalizer and renderer

License

Notifications You must be signed in to change notification settings

united-drivers/postal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postal

📮 international postal address normalizer and renderer

CircleCI GoDoc Go Report Card License GitHub release

Usage

Install with go get github.com/united-drivers/postal

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, or in the test file.

License

Apache 2.0