Administrative Area CLI
- Create db table
- Save a country
- Save the provinces of a country
- Save the cities/regencies of a country
- Save the districts of a country
- Save the villages of a country
- Indonesia (id)
To install the library and command line program, use the following:
go get -v github.com/ramadani/adminarea-cli/...
Create adminarea_config.yml
and fill it with following this values:
db:
driver: mysql
dsn: user:password@tcp(127.0.0.1:3306)/dbname?parseTime=true
setup Create administrative areas table
country Save a country province Save the provinces of a country
city Save the cities/regencies of a country
district Save the districts of a country
village Save the villages of a country
To create administrative_areas
table to your database, run this command:
adminarea-cli setup
// adminarea-cli country [COUNTRY_CODE_ID]
adminarea-cli country id
// adminarea-cli province [COUNTRY_CODE_ID]
adminarea-cli province id
// adminarea-cli city [COUNTRY_CODE_ID]
adminarea-cli city id
// adminarea-cli district [COUNTRY_CODE_ID]
adminarea-cli district id
// adminarea-cli village [COUNTRY_CODE_ID]
adminarea-cli village id
- Can create db table
- Config file can pass by argument
- Save a country
- Save provinces by country
- Save regencies by country
- Save districts by country
- Save villages by country
This library is distributed under the MIT license.