Skip to content

theplant/prefecturejp

Repository files navigation

Get Japanese By Name

func GetJapaneseByName(name string) (result string)

GetJapaneseByName returns the Japanese by the given Name.

Get Name By Japanese

func GetNameByJapanese(japanese string) (result string)

GetNameByJapanese returns the Name by the given Japanese.

Get Name By Short Name

func GetNameByShortName(shortName string) (result string)

GetNameByShortName returns the Name by the given ShortName.

Get Prefecture Japaneses

func GetPrefectureJapaneses() []string

GetPrefectureJapaneses return all the Japaneses of the Prefectures.

Get Prefecture Names

func GetPrefectureNames() []string

GetPrefectureNames return the all the Names of the Prefectures.

Get Prefecture Short Names

func GetPrefectureShortNames() []string

GetPrefectureShortNames return all the ShortNames of the Prefectures.

Get Short Name By Name

func GetShortNameByName(name string) (result string)

GetShortNameByName returns the ShortName by the given Name.

Type: Prefecture

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

type Prefectures []Prefecture

Prefectures contains a list of prefecture.

Prefectures: Get Prefectures

func GetPrefectures() Prefectures

GetPrefectures return the Japan prefecture list.

Prefectures: Get Prefectures JS ON

func GetPrefecturesJSON() (Prefectures, error)

GetPrefecturesJSON is a wrapper helper to jsonhandlerfunc.

Releases

No releases published

Packages

No packages published

Languages