Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SubCommand = cli2.SubCommand{ Help: "search for given names", Command: func(args []string, procInout cli2.ProcInout) byte { strokesMap := kanji.LoadStrokes() strokesFunc := strokes.ByMap(strokesMap) yomiMap := kanji.LoadYomi() yomiFunc := yomi.ByCartesian(yomiMap) cm := loader.Intersection(loader.Load(strokesMap), loader.Load(yomiMap)) opts, err := ParseOptions(args, procInout.Stdin, procInout.Stderr, cm, strokesFunc, yomiFunc) if err != nil { _, _ = fmt.Fprintf(procInout.Stderr, "failed to parse options: %s\n", err.Error()) return 1 } if opts.Help { return 0 } genOpts := gen.Options{ MinLength: opts.MinLength, MaxLength: opts.MaxLength, } if err := Main( opts.FamilyName, opts.GeneratorFunc, genOpts, opts.Filter, strokesFunc, printer.NewTSVPrinter(procInout.Stdout), sex.ByNameLists(sex.LoadMaleNames(), sex.LoadFemaleNames()), ); err != nil { _, _ = fmt.Fprintf(procInout.Stderr, "failed to search: %s\n", err.Error()) return 1 } return 0 }, }
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.