INNER CODE UNIT · Go

main

GGP1/kure · main.go:20

func main() {
	if err := validateFlags(); err != nil {
		if errors.Is(err, pflag.ErrHelp) {
			os.Exit(0)
		}
		fmt.Fprintln(os.Stderr, "error:", err)
		os.Exit(1)
	}

	if err := config.Init(); err != nil {
		fmt.Fprintln(os.Stderr, "couldn't initialize the configuration:", err)
		os.Exit(1)
	}

	// Check for and run stateless commands
	if len(os.Args) < 2 || root.IsStatelessCommand(os.Args[1]) {
		if err := root.NewCmd(nil).Execute(); err != nil {
			fmt.Fprintln(os.Stderr, "error:", err)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…