Closed runningmaster closed 6 years ago
What is stopping you from printing the error in Execute()
and exiting as shown in the example?
os.Exit(int(subcommands.Execute(ctx)))
Keep in mind, that this kind of change would break the build of all tools that use this package.
Sorry, I think I thought I had commented on this but I guess I never did. We can't take changes the break the interface of this package. As slewiskelly pointed out, you should print any error in the subcommands Execute().
I think that it will be useful for many users of this superb package.