package
0.0.0-20210505055417-57ebdd3d2c3e
Repository: https://github.com/go-alive/cli.git
Documentation: pkg.go.dev
# Functions
ApplyInputSourceValues iterates over all provided flags and executes ApplyInputSourceValue on flags implementing the FlagInputSourceExtension interface to initialize these flags to an alternate input source.
InitInputSource is used to to setup an InputSourceContext on a cli.Command Before method.
InitInputSourceWithContext is used to to setup an InputSourceContext on a cli.Command Before method.
NewBoolFlag creates a new BoolFlag.
NewDurationFlag creates a new DurationFlag.
NewFloat64Flag creates a new Float64Flag.
NewFloat64SliceFlag creates a new Float64SliceFlag.
NewGenericFlag creates a new GenericFlag.
NewInt64Flag creates a new Int64Flag.
NewInt64SliceFlag creates a new Int64SliceFlag.
NewIntFlag creates a new IntFlag.
NewIntSliceFlag creates a new IntSliceFlag.
NewJSONSource returns an InputSourceContext suitable for retrieving config variables from raw JSON data.
NewJSONSourceFromFile returns an InputSourceContext suitable for retrieving config variables from a file (or url) containing JSON data.
NewJSONSourceFromFlagFunc returns a func that takes a cli.Context and returns an InputSourceContext suitable for retrieving config variables from a file containing JSON data with the file name defined by the given flag.
NewJSONSourceFromReader returns an InputSourceContext suitable for retrieving config variables from an io.Reader that returns JSON data.
NewPathFlag creates a new PathFlag.
NewStringFlag creates a new StringFlag.
NewStringSliceFlag creates a new StringSliceFlag.
NewTomlSourceFromFile creates a new TOML InputSourceContext from a filepath.
NewTomlSourceFromFlagFunc creates a new TOML InputSourceContext from a provided flag name and source context.
NewUint64Flag creates a new Uint64Flag.
NewUintFlag creates a new UintFlag.
NewYamlSourceFromFile creates a new Yaml InputSourceContext from a filepath.
NewYamlSourceFromFlagFunc creates a new Yaml InputSourceContext from a provided flag name and source context.
# Structs
BoolFlag is the flag type that wraps cli.BoolFlag to allow for other values to be specified.
DurationFlag is the flag type that wraps cli.DurationFlag to allow for other values to be specified.
Float64Flag is the flag type that wraps cli.Float64Flag to allow for other values to be specified.
Float64SliceFlag is the flag type that wraps cli.Float64SliceFlag to allow for other values to be specified.
GenericFlag is the flag type that wraps cli.GenericFlag to allow for other values to be specified.
Int64Flag is the flag type that wraps cli.Int64Flag to allow for other values to be specified.
Int64SliceFlag is the flag type that wraps cli.Int64SliceFlag to allow for other values to be specified.
IntFlag is the flag type that wraps cli.IntFlag to allow for other values to be specified.
IntSliceFlag is the flag type that wraps cli.IntSliceFlag to allow for other values to be specified.
MapInputSource implements InputSourceContext to return data from the map that is loaded.
PathFlag is the flag type that wraps cli.PathFlag to allow for other values to be specified.
StringFlag is the flag type that wraps cli.StringFlag to allow for other values to be specified.
StringSliceFlag is the flag type that wraps cli.StringSliceFlag to allow for other values to be specified.
Uint64Flag is the flag type that wraps cli.Uint64Flag to allow for other values to be specified.
UintFlag is the flag type that wraps cli.UintFlag to allow for other values to be specified.
# Interfaces
FlagInputSourceExtension is an extension interface of cli.Flag that allows a value to be set on the existing parsed flags.
InputSourceContext is an interface used to allow other input sources to be implemented as needed.