Package Usage: go: github.com/voxelbrain/goptions
package goptions implements a flexible parser for command line options.
Key targets were the support for both long and short flag versions, mutually
exclusive flags, and verbs. Flags and their corresponding variables are defined
by the tags in a (possibly anonymous) struct.
Short flags can be combined (e.g. `-nfv`). Long flags take their value after a
separating space. The equals notation (`--long-flag=value`) is NOT supported
right now.
Every member of the struct which is supposed to catch a command line value
has to have a "goptions" tag. The contains the short and long flag names for this
member but can additionally specify any of these options below.
Depending on the type of the struct member, additional options might become available:
If a member is a slice type, multiple definitions of the flags are possible. For each
specification the underlying type will be used.
goptions also has support for verbs. Each verb accepts its own set of flags which
take exactly the same tag format as global options. For an usage example of verbs
see the PrintHelp() example.
1 version
Latest release: about 7 years ago
100 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/voxelbrain/goptions