china_area

package
v0.0.0-...-8845ca5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChinaArea = NewAreaManage()
View Source
var RemoteUrl string

Functions

func Load

func Load() error

Types

type Area

type Area struct {
	Name string `json:"name,omitempty"`
	Code string `json:"code,omitempty"`

	Children map[string]*Area `json:"children,omitempty"`
}

func SearchProvince

func SearchProvince(province string) (*Area, bool)

func (*Area) SearchSubArea

func (p *Area) SearchSubArea(subArea string) (*Area, bool)

type AreaManage

type AreaManage struct {
	// contains filtered or unexported fields
}

func NewAreaManage

func NewAreaManage() *AreaManage

func (*AreaManage) Load

func (p *AreaManage) Load() error

func (*AreaManage) SearchProvince

func (p *AreaManage) SearchProvince(province string) (*Area, bool)

Jump to

Keyboard shortcuts

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