Daniel Nephin
34ceca591b
Disable flags in UseLine ( #552 )
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2017-11-19 08:58:54 +01:00
Daniel Nephin
83b1f03962
Add a TraverseChildren option to allow for flags on each command in the hierarchy ( #299 )
...
Fix #277
Fix #467
2017-10-07 23:29:11 +02:00
Daniel Nephin
f20b4e9c32
Refactor TakesArgs to use an interface for arg validation.
...
Fix some typos in README and comments.
Move arg validation to after flag validation so that the help flag is run first.
Pass the same args to ValidateArgs as the Run methods receive.
Update README.
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2017-07-23 09:57:27 +02:00
Daniel Nephin
99600f6874
Add a tags field for user defined tags on a Command. ( #359 )
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2017-02-07 16:20:48 -05:00
Daniel Nephin
67feb8173c
Add support for setting a function to handle flag parsing errors.
...
The default pflag error is to only print the bad flag. This enables an application
to include a usage message or other details about the error.
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2016-10-10 10:56:48 -04:00
Daniel Nephin
e291587027
Cretea a new GenManTree function that takes an options struct.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2016-06-21 14:47:14 -04:00
Daniel Nephin
97206b3170
Use the correct man page section for the filename
...
Also make header mutation cleaner.
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2016-06-21 14:30:54 -04:00
Daniel Nephin
112c7dca3a
Hide deprecated shorthand flags in man page generation.
2016-06-21 14:30:26 -04:00
Daniel Nephin
29c0a1f42e
Use the correct UseLine for the man page synposis.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2016-06-20 17:27:41 -04:00
Daniel Nephin
7faa7fcdd2
Merge persistent flags before checking for a help flag.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2016-06-20 14:58:44 -04:00