func main()

in output/output.go [58:82]


func main() {
	flag.Parse()

	if *funcName == "" {
		_, _ = fmt.Fprintln(os.Stderr, "func name required")
		os.Exit(1)
	}
	f, exist := funcMap[*funcName]
	if !exist {
		_, _ = fmt.Fprintln(os.Stderr, "func name not exist: ", *funcName)
		os.Exit(1)
	}

	defer func() {
		if err := recover(); err != nil {
			_, _ = fmt.Fprintln(os.Stderr, "error: ", err)
			os.Exit(1)
		}
	}()
	if _, err := os.Stdout.Write(f()); err != nil {
		_, _ = fmt.Fprintln(os.Stderr, "call error: ", err)
		os.Exit(1)
	}
	os.Exit(0)
}