Skip to content

vgmdj/gb2260

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gb2260

latest revision

  • 2018.02

source list

the src file dir

  • data/

the go file dir

  • gbdata/

customize

you can modify the generate.go to create your own format

tsv file generate script

https://github.com/cn/GB2260 you can midify the sources.tsv and use make to generate the src data

usage

if you use golang as your language, you can use https://github.com/vgmdj/utils as your parsing package directly

package main

import(
    "fmt"
    "github.com/vgmdj/utils/area"
    _ "github.com/vgmdj/gb2260/gbdata"  //导入数据包
)

func main(){
   gb2260 := area.NewArea(area.GB2260)
   bj := gb2260.Get("110101")
   fmt.Println(bj.Province)    //北京市
   fmt.Println(bj.County)      //东城区
   fmt.Println(bj.FullName())  //北京市东城区
}


About

1986-2018 年间的gb2260数据及go的数据包

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages