Documentation ¶
Index ¶
- func Argument() argo.ArgumentBuilder
- func Branch(name string) argo.CommandBranchBuilder
- func Command() argo.CommandBuilder
- func Flag() argo.FlagBuilder
- func FlagGroup(name string) argo.FlagGroupBuilder
- func Leaf(name string) argo.CommandLeafBuilder
- func LongFlag(name string) argo.FlagBuilder
- func ShortFlag(f byte) argo.FlagBuilder
- func Tree() argo.CommandTreeBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Argument ¶
func Argument() argo.ArgumentBuilder
Argument returns a new ArgumentBuilder instance which can be used to construct an Argument instance.
func Branch ¶
func Branch(name string) argo.CommandBranchBuilder
Branch returns a new CommandBranchBuilder instance which can be used to construct an CommandBranch instance.
func Command ¶
func Command() argo.CommandBuilder
Command returns a new CommandBuilder instance which can be used to construct a Command instance.
This function and Tree are the two entrypoints into the Argonaut library. This function returns a value that may be used in a call chain to construct a full-featured command line interface.
Example:
cli.Command(). WithFlag(cli.Flag(). WithLongForm("hex"). WithShortForm('x'). WithDescription("Hex value"). WithBinding(&conf.Hex, true)). WithFlag(cli.Flag(). WithLongForm("uhex"). WithShortForm('u'). WithDescription("Unsigned hex value"). WithBinding(&conf.UHex, true)). WithFlag(cli.Flag(). WithLongForm("octal"). WithShortForm('o'). WithDescription("Octal value"). WithBinding(&conf.Octal, true)). MustParse(os.Args)
func Flag ¶
func Flag() argo.FlagBuilder
Flag returns a new FlagBuilder instance which can be used to construct a Flag instance.
func FlagGroup ¶
func FlagGroup(name string) argo.FlagGroupBuilder
FlagGroup returns a new FlagGroupBuilder instance which can be used to construct an FlagGroup instance.
func Leaf ¶
func Leaf(name string) argo.CommandLeafBuilder
Leaf returns a new CommandLeafBuilder instance which can be used to construct an CommandLeaf instance.
func LongFlag ¶
func LongFlag(name string) argo.FlagBuilder
LongFlag returns a new FlagBuilder instance with the long form already set to the given value.
This function is a shortcut for:
cli.Flag().WithLongForm(...)
func ShortFlag ¶
func ShortFlag(f byte) argo.FlagBuilder
ShortFlag returns a new FlagBuilder instance with the short form already set to the given value.
This function is a shortcut for:
cli.Flag().WithShortForm(...)
func Tree ¶
func Tree() argo.CommandTreeBuilder
Tree returns a new CommandTreeBuilder instance which can be used to construct a CommandTree instance.
A command tree is a tree of nested subcommands of arbitrary depth. The tree consists of branch and leaf nodes, with the leaf nodes being the selectable final commands.
Types ¶
This section is empty.