flags
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package flags provide convenience types and routines to accept specific typesof flag values on the command line.
Index¶
- func DurationSlice(name string, defaultVal []time.Duration, usage string) *[]time.Duration
- func IntSlice(name string, defaultVal []int, usage string) *[]int
- func StringSlice(name string, defaultVal []string, usage string) *[]string
- func StringWithAllowedValues(name, defaultVal, usage string, allowed []string) *string
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcDurationSlice¶
DurationSlice returns a flag representing a slice of time.Duration objects.
funcStringSlice¶added inv1.27.0
StringSlice returns a flag representing a slice of strings.
funcStringWithAllowedValues¶
StringWithAllowedValues returns a flag variable of typestringFlagWithAllowedValues configured with the provided parameters.'allowed` is the set of values that this flag can be set to.
Types¶
This section is empty.