I'm liking the project so far, but trying to figure out the context for help information with regards to the single purpose script vs the complex script referenced here
In the single purpose script, help is handled by opt.Bool("help", ... ) and if opt.Called("help") { fmt.Println(opt.Help() }
In the complex script, help is defined by opt.HelpCommand("help", ... ), handled within the Dispatch() call, returning ErrHelpCalled.
I just want to verify that this is correct; that these two methods of handling help are essentially exclusive (shouldn't be mixed). To me, it seems inconsistent having two different methods for handling help depending on the complexity; could help be handled within parse() returning ErrHelpCalled to make things more consistent?
Just a thought..
I'm liking the project so far, but trying to figure out the context for help information with regards to the single purpose script vs the complex script referenced here
In the single purpose script, help is handled by
opt.Bool("help", ... )andif opt.Called("help") { fmt.Println(opt.Help() }In the complex script, help is defined by
opt.HelpCommand("help", ... ), handled within theDispatch()call, returningErrHelpCalled.I just want to verify that this is correct; that these two methods of handling help are essentially exclusive (shouldn't be mixed). To me, it seems inconsistent having two different methods for handling help depending on the complexity; could help be handled within
parse()returningErrHelpCalledto make things more consistent?Just a thought..