- Get Japanese By Name
- Get Name By Japanese
- Get Name By Short Name
- Get Prefecture Japaneses
- Get Prefecture Names
- Get Prefecture Short Names
- Get Short Name By Name
- Type Prefecture
- Type Prefectures
func GetJapaneseByName(name string) (result string)
GetJapaneseByName returns the Japanese
by the given Name
.
func GetNameByJapanese(japanese string) (result string)
GetNameByJapanese returns the Name
by the given Japanese
.
func GetNameByShortName(shortName string) (result string)
GetNameByShortName returns the Name
by the given ShortName
.
func GetPrefectureJapaneses() []string
GetPrefectureJapaneses return all the Japanese
s of the Prefectures.
func GetPrefectureNames() []string
GetPrefectureNames return the all the Name
s of the Prefectures.
func GetPrefectureShortNames() []string
GetPrefectureShortNames return all the ShortName
s of the Prefectures.
func GetShortNameByName(name string) (result string)
GetShortNameByName returns the ShortName
by the given Name
.
type Prefecture struct {
// The standard code, like: JP-01, JP-02, etc
Code string `json:"code"`
// The english name, like: Hokkaido, Aomori etc
Name string `json:"name"`
// The japanese name, like: 北海道, 岩手県 etc
Japanese string `json:"japanese"`
// The short name of japanese, like: 北海道, 青森 etc.
ShortName string `json:"short_name"`
}
Prefecture which defines codes for the names of the principal subdivisions (e.g.provinces or states) of all countries coded in ISO 3166-1.
See: https://en.wikipedia.org/wiki/ISO_3166-2:JP
type Prefectures []Prefecture
Prefectures contains a list of prefecture.
func GetPrefectures() Prefectures
GetPrefectures return the Japan prefecture list.
func GetPrefecturesJSON() (Prefectures, error)
GetPrefecturesJSON is a wrapper helper to jsonhandlerfunc.