prefcodejpn

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PREFCODE_MIN = HOKKAIDO
	PREFCODE_MAX = OKINAWA
)

Functions

This section is empty.

Types

type Code

type Code uint

Code is prefecture code in Japan

const (
	UNKNOWN Code = iota
	HOKKAIDO
	AOMORI
	IWATE
	MIYAGI
	AKITA
	YAMAGATA
	FUKUSHIMA
	IBARAKI
	TOCHIGI
	GUNMA
	SAITAMA
	CHIBA
	TOKYO
	KANAGAWA
	NIIGATA
	TOYAMA
	ISHIKAWA
	FUKUI
	YAMANASHI
	NAGANO
	GIFU
	SHIZUOKA
	AICHI
	MIE
	SHIGA
	KYOTO
	OSAKA
	HYOGO
	NARA
	WAKAYAMA
	TOTTORI
	SHIMANE
	OKAYAMA
	HIROSHIMA
	YAMAGUCHI
	TOKUSHIMA
	KAGAWA
	EHIME
	KOCHI
	FUKUOKA
	SAGA
	NAGASAKI
	KUMAMOTO
	OITA
	MIYAZAKI
	KAGOSHIMA
	OKINAWA
)

func FromCodeString

func FromCodeString(s string) Code

func FromPrefName

func FromPrefName(s string) Code

func New

func New(cd uint) Code

func (Code) Equal

func (lpc Code) Equal(rpc Code) bool

Equal method returns true if lpc == rpc

func (Code) Less

func (lpc Code) Less(rpc Code) bool

Less method returns true if lpc < rpc

func (Code) MarshalJSON

func (pc Code) MarshalJSON() ([]byte, error)

MarshalJSON method returns string for json.Marshal().

func (Code) Name

func (pc Code) Name() string

func (Code) NameUpper

func (pc Code) NameUpper() string

func (Code) String

func (pc Code) String() string

func (Code) Title

func (pc Code) Title() string

func (*Code) UnmarshalJSON

func (pc *Code) UnmarshalJSON(b []byte) error

UnmarshalJSON method returns result of Unmarshal for json.Unmarshal().

Jump to

Keyboard shortcuts

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