go-flags
go-flags copied to clipboard
go command line option parser
If a 'ini-name' tag is set on the option, write it to file even if the option is a function.
Added support for two parser options // AutoGenerateLong if long is not specified as an option it will be // auto generated based on the struct field name AutoGenerateLong //...
I'm in a situation where I have a top-level command that I want to mark as hidden, however, I want to display all of the command's options when explicitly calling...
Without this change, groups that are commands but that don't satisfy (*Group).showInHelp() would be skipped when working out the alignment, which would result in negative lengths when trying to process...
for example. AbortOnFail bool `long:"abortOnFail" description:"." default:"true"` then when you run your cmd, nothing shows up and your cmd is done. take a look at NewParser function in parser.go, can...
Like it's mentioned in the title, if I pass an invalid choice via ENV, it's ignored and the value of the option is set to an empty value. And even...
As illustrated in the test case, if there's an optional subcommand but the parent command also takes positional arguments, the subcommand is never selected. This PR alters the order of...
By specifying `depends:x` the option x is required for this parameter: Param1 string `short:"a" long:"param1" depends:"privatekey"` Param2 string `short:"b" long:"param2" depends:"param1"` Param3 string `short:"c" long:"param3" default:"" depends:"a"` This would mean,...
``` package main import ( "os" "github.com/jessevdk/go-flags" ) func main() { config := struct { Config string `long:"config" default:"default"` }{} parser := flags.NewParser(nil, flags.Default) { c, _ := parser.AddCommand("hi", "hi",...
There is no way to specify that parameter is dependent to another parameter (where parameter is only meaningful if some other parameter is set or in docopt notation "-a [-x...