Documentation ¶
Index ¶
- func CountData() string
- func SetRandom(rnd *rand.Rand)
- type Address
- type Item
- type Name
- func FindNameByHiragana(hiragana string) *Name
- func FindNameByKanji(kanji string) *Name
- func FindNameByKatakana(katakana string) *Name
- func FindNameByRomaji(romaji string) *Name
- func NewCat() *Name
- func NewDog() *Name
- func NewFemale() *Name
- func NewFemaleCat() *Name
- func NewFemaleDog() *Name
- func NewMale() *Name
- func NewMaleCat() *Name
- func NewMaleDog() *Name
- func NewName() *Name
- type Sex
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
Address store address that is pointed by prefecture/city/town.
Example ¶
address := gimei.FindAddressByKanji("岡山県大島郡大和村稲木町") fmt.Println(address) fmt.Println(address.Kanji()) fmt.Println(address.Hiragana()) fmt.Println(address.Katakana()) fmt.Println(address.Prefecture.Kanji()) fmt.Println(address.Prefecture.Hiragana()) fmt.Println(address.Prefecture.Katakana()) fmt.Println(address.City.Kanji()) fmt.Println(address.City.Hiragana()) fmt.Println(address.City.Katakana()) fmt.Println(address.Town.Kanji()) fmt.Println(address.Town.Hiragana()) fmt.Println(address.Town.Katakana())
Output: 岡山県大島郡大和村稲木町 岡山県大島郡大和村稲木町 おかやまけんおおしまぐんやまとそんいなぎちょう オカヤマケンオオシマグンヤマトソンイナギチョウ 岡山県 おかやまけん オカヤマケン 大島郡大和村 おおしまぐんやまとそん オオシマグンヤマトソン 稲木町 いなぎちょう イナギチョウ
func FindAddressByHiragana ¶
FindAddressByHiragana find Address by hiragana.
func FindAddressByKanji ¶
FindAddressByKanji find Address by kanji.
func FindAddressByKatakana ¶
FindAddressByKatakana find Address by katakana.
type Item ¶
type Item []string
Item take four figure for japanese. Kanji/Hiragana/Katakana/Romaji. It's not only the difference of sounds, it just letters.
type Name ¶
Name store name and sex for a person.
Example ¶
name := gimei.FindNameByKanji("小林 顕士") fmt.Println(name) fmt.Println(name.Kanji()) fmt.Println(name.Hiragana()) fmt.Println(name.Katakana()) fmt.Println(name.Romaji()) fmt.Println(name.Last.Kanji()) fmt.Println(name.Last.Hiragana()) fmt.Println(name.Last.Katakana()) fmt.Println(name.Last.Romaji()) fmt.Println(name.First.Kanji()) fmt.Println(name.First.Hiragana()) fmt.Println(name.First.Katakana()) fmt.Println(name.First.Romaji()) fmt.Println(name.Sex)
Output: 小林 顕士 小林 顕士 こばやし けんじ コバヤシ ケンジ Kenji Kobayashi 小林 こばやし コバヤシ Kobayashi 顕士 けんじ ケンジ Kenji 男
func FindNameByHiragana ¶
FindNameByHiragana find Name by hiragana.
func FindNameByKatakana ¶
FindNameByKatakana find Name by katakana.
func FindNameByRomaji ¶
FindNameByRomaji find Name by romaji.
func NewCat ¶
func NewCat() *Name
NewCat return new instance of person whose last name begins "neko".
func NewDog ¶
func NewDog() *Name
NewDog return new instance of person whose last name begins "inu".
func NewFemaleCat ¶
func NewFemaleCat() *Name
NewFemaleCat return new instance of female person whose last name begins "neko".
func NewFemaleDog ¶
func NewFemaleDog() *Name
NewFemaleDog return new instance of female person whose last name begins "inu".
func NewMaleCat ¶
func NewMaleCat() *Name
NewMaleCat return new instance of male person whose last name begins "neko".
func NewMaleDog ¶
func NewMaleDog() *Name
NewMaleDog return new instance of male person whose last name begins "inu".