go-city

command module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

go-city

全国「省市区县乡镇街道」,支持京东、国家统计局

install

go install github.com/xiaoxuan6/go-city@latest

Usage

1、数据来源于【京东】

Sqlite

go-city sync --db=./sqlite.db

Database

go-city sync --driver=database --host=127.0.0.1 --port=3306 --username=root --password=root --dbname=city --table=city

数据来源于【国家统计局】

Sqlite

go-city sync-tjj --db=./sqlite.db

Database

go-city sync-tjj --driver=database --host=127.0.0.1 --port=3306 --username=root --password=root --dbname=city --table=city

More

NAME:
   go-city - go city

USAGE:
   go-city [global options] command [command options] [arguments...]

COMMANDS:
   sync, s
   sync-tjj, tjj
   help, h        Shows a list of commands or help for one command

GLOBAL OPTIONS:
  --help, -h  show help

OPTIONS:
   --driver value, -d value  db driver,Support:sqlite、database、memory (default: "sqlite") [%GO_CITY_DRIVER%]
   --db value                database file (default: "./sqlite.db") [%GO_CITY_DB%]
   --host value              database host (default: "127.0.0.1") [%GO_CITY_DB_HOST%]
   --port value              database port (default: "3306") [%GO_CITY_DB_PORT%]
   --username value          database username (default: "root") [%GO_CITY_DB_USERNAME%]
   --password value          database password (default: "root") [%GO_CITY_DB_PASSWORD%]
   --dbname value            database dbname [%GO_CITY_DB_NAME%]
   --table value             database table name (default: "cities") [%GO_CITY_DB_TABLE_NAME%]
   --force                   drop table (default: false) [%GO_CITY_DB_FORCE%]
   --help, -h                show help

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL