Directories
¶
Path | Synopsis |
---|---|
this is show case for argument action argument action will be executed when user input has a match to the binding argument
|
this is show case for argument action argument action will be executed when user input has a match to the binding argument |
this is show case for most simple use of argparse with a String Optional Argument created binding to variable 'name' and default help support
|
this is show case for most simple use of argparse with a String Optional Argument created binding to variable 'name' and default help support |
this is show case for a little bit complex than 'basic' which disabled the default help menu entry '-h' or '--help', instead, it use '-help' and '--help-me' as help menu entry and handle help print manually also, it pass 'os.Args[1:]' manually to 'Parse' method, which is the same as pass 'nil'
|
this is show case for a little bit complex than 'basic' which disabled the default help menu entry '-h' or '--help', instead, it use '-help' and '--help-me' as help menu entry and handle help print manually also, it pass 'os.Args[1:]' manually to 'Parse' method, which is the same as pass 'nil' |
this is show case for some advanced use use Option.Validate to check if the user input is valid use Option.Formatter to pre-format the user input, before binding to the variable 'host' if there's more free-type argument need, check out another example 'any-type-action'
|
this is show case for some advanced use use Option.Validate to check if the user input is valid use Option.Formatter to pre-format the user input, before binding to the variable 'host' if there's more free-type argument need, check out another example 'any-type-action' |
this is show case for expand * for positional arguments run the code like "go run main.go ~" or "go run main.go ~/*"
|
this is show case for expand * for positional arguments run the code like "go run main.go ~" or "go run main.go ~/*" |
this is show case for Hide entry you won't see argument 'greet', but you can still use the entry
|
this is show case for Hide entry you won't see argument 'greet', but you can still use the entry |
this is show case for multi parser in Action it act like sub command, but with less restriction
|
this is show case for multi parser in Action it act like sub command, but with less restriction |
this is show case like npm install xxx xx with sub-command and its positional argument, you can run the code like "go run main.go install express vue"
|
this is show case like npm install xxx xx with sub-command and its positional argument, you can run the code like "go run main.go install express vue" |
this is show case for default parse action when no user input is given, also has effect on sub command run code like "go run main.go" or "go run main.go test"
|
this is show case for default parse action when no user input is given, also has effect on sub command run code like "go run main.go" or "go run main.go test" |
this show case is for 'ParserConfig', showing how the config affect your parsing progress set ParserConfig.Usage will change your usage line, which can sometime be too complex for user to read set ParserConfig.EpiLog will append a message after help message, which is usually for contact info set ParserConfig.DisableHelp will prevent the default help entry injection, with ParserConfig.DisableHelp, you won't see '-h' or '--help' entry set ParserConfig.DisableDefaultShowHelp will farther prevent default help output when there is no user input set ParserConfig.ContinueOnHelp will keep program going on when the original help action is done the configs about 'Help' is not often used, most programmer may not care about it
|
this show case is for 'ParserConfig', showing how the config affect your parsing progress set ParserConfig.Usage will change your usage line, which can sometime be too complex for user to read set ParserConfig.EpiLog will append a message after help message, which is usually for contact info set ParserConfig.DisableHelp will prevent the default help entry injection, with ParserConfig.DisableHelp, you won't see '-h' or '--help' entry set ParserConfig.DisableDefaultShowHelp will farther prevent default help output when there is no user input set ParserConfig.ContinueOnHelp will keep program going on when the original help action is done the configs about 'Help' is not often used, most programmer may not care about it |
this is show case for most simple use of argparse with a String Optional Argument created binding to variable 'name' and default help support
|
this is show case for most simple use of argparse with a String Optional Argument created binding to variable 'name' and default help support |
this show case is for sub command sub command is created by AddCommand, which returns a *Parser for programmer to bind arguments sub command has different parse context from main parser (created by NewParser) mainly use sub command to help user understand your program step by step
|
this show case is for sub command sub command is created by AddCommand, which returns a *Parser for programmer to bind arguments sub command has different parse context from main parser (created by NewParser) mainly use sub command to help user understand your program step by step |
this show case is for Argument Groups group arguments in different group in help message but if there is too many argument, it's better to change ParserConfig.Usage to a simpler string Argument Group is for user to better understand your program group by group you should also checkout SubCommand for reference, they are quit like each other
|
this show case is for Argument Groups group arguments in different group in help message but if there is too many argument, it's better to change ParserConfig.Usage to a simpler string Argument Group is for user to better understand your program group by group you should also checkout SubCommand for reference, they are quit like each other |
Click to show internal directories.
Click to hide internal directories.