SYMBOL INDEX (82 symbols across 16 files) FILE: cnregion.go function LoadFS (line 23) | func LoadFS(f fs.FS, file, separator string, compress bool, version ...i... function Load (line 34) | func Load(data []byte, separator string, compress bool, version ...int) ... function LoadFile (line 61) | func LoadFile(file, separator string, compress bool, version ...int) (*D... method Dump (line 70) | func (db *DB) Dump(file string, compress bool) error { FILE: cnregion_test.go function TestLoad (line 18) | func TestLoad(t *testing.T) { function TestDB_LoadDump (line 46) | func TestDB_LoadDump(t *testing.T) { function TestLoadFS (line 60) | func TestLoadFS(t *testing.T) { FILE: data/embed.go function Embed (line 19) | func Embed(separator string, version ...int) (*cnregion.DB, error) { FILE: data/embed_test.go function TestEmbed (line 13) | func TestEmbed(t *testing.T) { FILE: db.go constant Version (line 21) | Version = 1 type DB (line 40) | type DB struct method Versions (line 62) | func (db *DB) Versions() []int { return db.versions } method AddVersion (line 65) | func (db *DB) AddVersion(ver int) (ok bool) { method Find (line 75) | func (db *DB) Find(regionID string) *Region { return db.root.findItem(... method AddItem (line 80) | func (db *DB) AddItem(regionID, name string, ver int) error { method marshal (line 94) | func (db *DB) marshal() ([]byte, error) { method unmarshal (line 118) | func (db *DB) unmarshal(data []byte) error { method filterVersions (line 162) | func (db *DB) filterVersions(versions []int) []int { function NewDB (line 55) | func NewDB() *DB { FILE: db_test.go function init (line 81) | func init() { function setRegionDB (line 85) | func setRegionDB(r *Region, db *DB) { function TestDB_Find (line 92) | func TestDB_Find(t *testing.T) { FILE: districts.go method Districts (line 12) | func (db *DB) Districts() []*Region { return db.districts } method initDistricts (line 14) | func (db *DB) initDistricts() { FILE: districts_test.go function TestDB_Districts (line 13) | func TestDB_Districts(t *testing.T) { FILE: id/id.go type Level (line 14) | type Level constant Village (line 18) | Village Level = 1 << iota constant Town (line 19) | Town constant County (line 20) | County constant City (line 21) | City constant Province (line 22) | Province constant AllLevel (line 24) | AllLevel = Village + Town + County + City + Province function Length (line 36) | func Length(level Level) int { function Split (line 45) | func Split(id string) (province, city, county, town, village string) { function SplitFilter (line 62) | func SplitFilter(id string) []string { function filterZero (line 67) | func filterZero(id ...string) []string { function Parent (line 80) | func Parent(id string) string { function Prefix (line 89) | func Prefix(id string) string { function Fill (line 97) | func Fill(id string, level Level) string { function isZero (line 110) | func isZero(id string) bool { FILE: id/id_test.go function TestSplit (line 13) | func TestSplit(t *testing.T) { function TestSplitFilter (line 28) | func TestSplitFilter(t *testing.T) { function TestParent (line 46) | func TestParent(t *testing.T) { function TestPrefix (line 53) | func TestPrefix(t *testing.T) { function TestFill (line 61) | func TestFill(t *testing.T) { function TestIsZero (line 74) | func TestIsZero(t *testing.T) { FILE: region.go type Region (line 20) | type Region struct method ID (line 37) | func (r *Region) ID() string { return r.id } method Name (line 38) | func (r *Region) Name() string { return r.name } method FullName (line 39) | func (r *Region) FullName() string { return r.fullName } method FullID (line 40) | func (r *Region) FullID() string { return r.fullID } method Versions (line 41) | func (r *Region) Versions() []int { return r.versions } method Items (line 42) | func (r *Region) Items() []*Region { return r.items } method IsSupported (line 45) | func (r *Region) IsSupported(ver int) bool { return slices.Index(r.ver... method addItem (line 47) | func (reg *Region) addItem(id, name string, level id.Level, ver int) e... method setSupported (line 68) | func (reg *Region) setSupported(ver int) error { method findItem (line 79) | func (reg *Region) findItem(regionID ...string) *Region { method marshal (line 93) | func (reg *Region) marshal(buf *errwrap.Buffer) error { method unmarshal (line 114) | func (reg *Region) unmarshal(data []byte, parentName, parentID string,... method Provinces (line 35) | func (db *DB) Provinces() []*Region { return db.root.items } function indexBytes (line 176) | func indexBytes(data []byte, b byte) ([]byte, string) { function findEnd (line 185) | func findEnd(data []byte) int { FILE: region_test.go function TestRegion_IsSupported (line 15) | func TestRegion_IsSupported(t *testing.T) { function TestRegion_addItem (line 29) | func TestRegion_addItem(t *testing.T) { function TestRegion_SetSupported (line 46) | func TestRegion_SetSupported(t *testing.T) { function TestFindEnd (line 60) | func TestFindEnd(t *testing.T) { function TestDB_Provinces (line 67) | func TestDB_Provinces(t *testing.T) { function TestRegion_Items (line 80) | func TestRegion_Items(t *testing.T) { function TestRegion_findItem (line 131) | func TestRegion_findItem(t *testing.T) { FILE: search.go type Options (line 14) | type Options struct method isEmpty (line 37) | func (o *Options) isEmpty() bool { method Search (line 45) | func (db *DB) Search(opt *Options) []*Region { method search (line 72) | func (reg *Region) search(opt *Options, list []*Region) []*Region { FILE: search_test.go function TestDB_Search (line 17) | func TestDB_Search(t *testing.T) { function TestDB_SearchWithData (line 70) | func TestDB_SearchWithData(t *testing.T) { FILE: version/version.go constant start (line 19) | start = 2009 function All (line 25) | func All() []int { return Range(start, latest) } function IsValid (line 28) | func IsValid(year int) bool { return year >= start && year <= latest } function BeginWith (line 31) | func BeginWith(begin int) []int { return Range(begin, latest) } function Range (line 34) | func Range(begin, end int) []int { FILE: version/version_test.go function TestAll (line 13) | func TestAll(t *testing.T) { function TestBeginWith (line 22) | func TestBeginWith(t *testing.T) {