all

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator is context for gimei and address generator.

func New

func New() *Generator

New function returns Generator instance.

Example
package main

import (
	"fmt"

	"github.com/goark/gimei-cli/all"
	"github.com/goark/mt/mt19937"
)

func main() {
	gen := all.New().WithRandSource(mt19937.New(19650218)).WithUnique(true).WithFilters("松江").WithGenderOther(true)
	for i := 0; i < 15; i++ {
		fmt.Println(gen.New())
	}
}
Output:

宮原 比呂志 (ミヤハラ ヒロシ : 男性) -> 島根県 松江市 三木里町 (シマネケン マツエシ ミキサトチョウ)
梅田 鈴望 (ウメダ レミ : 女性) -> 島根県 松江市 古市場 (シマネケン マツエシ フルイチバ)
庄司 洋裕 (ショウジ ヒロヤス : 男性) -> 島根県 松江市 芥田 (シマネケン マツエシ アクタダ)
稲垣 美晴 (イナガキ ミハル : 女性) -> 島根県 松江市 日置野田 (シマネケン マツエシ ヘキノダ)
菊池 鼓太郎 (キクチ コタロウ : その他) -> 島根県 松江市 三輪 (シマネケン マツエシ ミワ)
竹内 乃聖 (タケウチ ノア : 女性) -> 島根県 松江市 尾崎丁 (シマネケン マツエシ オザキチョウ)
宮田 芽 (ミヤタ モエ : 女性) -> 島根県 松江市 本宮北ノ内 (シマネケン マツエシ モトミヤキタノウチ)
藤原 十実 (フジワラ トミ : 女性) -> 島根県 松江市 原町田 (シマネケン マツエシ ハラマチダ)
青木 光彦 (アオキ ミツヒコ : 男性) -> 島根県 松江市 波積町本郷 (シマネケン マツエシ ハヅミチョウホンゴウ)
堀内 美風 (ホリウチ ミカ : 女性) -> 島根県 松江市 衣川区桧山沢 (シマネケン マツエシ コロモガワクヒヤマサワ)
内田 麗流 (ウチダ レナ : 女性) -> 島根県 松江市 浦川原区上柿野 (シマネケン マツエシ ウラガワラクカミガキノ)
園田 逸平 (ソノダ イッペイ : 男性) -> 島根県 松江市 留辺蘂町金華 (シマネケン マツエシ ルベシベチョウカネハナ)
中川 洸 (ナカガワ コウ : 男性) -> 島根県 松江市 上熊本 (シマネケン マツエシ カミクマモト)
森山 照高 (モリヤマ テルタカ : 男性) -> 島根県 松江市 井堀中郷町 (シマネケン マツエシ イボリナカゴウチョウ)
柴田 満夫 (シバタ ミツオ : 男性) -> 島根県 松江市 飯島道東 (シマネケン マツエシ イイジマミチヒガシ)

func (*Generator) New

func (gen *Generator) New() *Info

New method return new Info instance.

func (*Generator) WithFilters

func (gen *Generator) WithFilters(keyword string) *Generator

WithFilters method sets filters.

func (*Generator) WithGenderOther

func (gen *Generator) WithGenderOther(flag bool) *Generator

WithGenderOther methos sets other flag.

func (*Generator) WithRandSource

func (gen *Generator) WithRandSource(src rand.Source) *Generator

WithRandSource methos sets rand.Source.

func (*Generator) WithUnique

func (gen *Generator) WithUnique(flag bool) *Generator

WithUnique method sets unique flag.

type Info

type Info struct {
	Gimei   *gimei.Gimei
	Address *address.Address
}

Info is information for Gimei and Address.

func (*Info) String

func (i *Info) String() string

Jump to

Keyboard shortcuts

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