Documentation
¶
Index ¶
- func Revisions() []string
- type Division
- func (div Division) Country() *Division
- func (div Division) Description() string
- func (div Division) Equal(other Division) bool
- func (div Division) IsCountry() bool
- func (div Division) IsPrefecture() bool
- func (div Division) IsProvince() bool
- func (div Division) Prefecture() *Division
- func (div Division) Province() *Division
- func (div Division) Stack() []*Division
- func (div Division) String() string
- type GB2260
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Division ¶
type Division struct {
Code string `json:"code"` // The six-digit number of the specific administrative division.
Name string `json:"name"` // The Chinese name of the specific administrative division.
Revision string `json:"revision"` // Optional. The revision year, and empty means "latest".
// contains filtered or unexported fields
}
Division 地区
type GB2260 ¶
GB2260 GB2260
func (GB2260) Counties ¶
Counties Return a list of counties in Division data structure. A prefecture_code is a 6-length code that endswith 00. It can also be a 4-length code.
func (GB2260) Prefectures ¶
Prefectures Return a list of prefecture level cities in Division data structure. A province_code is a 6-length province code. It can also be: 2-length code 4-length code that endswith 00
Click to show internal directories.
Click to hide internal directories.