packagemainimport("fmt""github.com/leaanthony/clir")funccustomFlagError(cmdPathstring,errerror)error{returnfmt.Errorf(`%s flag v0.0.1 - A custom error exampleFlags: --help Get help on the '%s' command`,err,cmdPath)}funcmain(){// Create new clicli:=clir.NewCli("flag","A custom error example","v0.0.1")cli.SetErrorFunction(customFlagError)cli.NewSubCommand("test","Testing whether subcommand path returns correctly via err callback")// Run!iferr:=cli.Run();err!=nil{fmt.Println(err)}}