package
0.0.0-20181025162720-c8a214aafdbb
Repository: https://github.com/turbinelabs/nonstdlib.git
Documentation: pkg.go.dev

# Packages

Package usages provides a mechanism to insert and recover richer usage information (eg whether a flag is required, whether it contains sensitive information) into and from a flag.Flag usage string, respectively.

# Functions

Enumerate returns a slice containing all Flags in the Flagset.
EnvKey produces a namespaced environment variable key, concatenates a prefix and key with an infix underscore, replacing all non-alphanumeric, non-underscore characters with underscores, and upper-casing the entire string.
IsSet indicates whether a given Flag in a FlagSet has been set or not.
NewChoice produces a Choice with a set of allowed values.
NewFromEnv produces a FromEnv, using the provided FlagSet and scopes.
NewHostPort constructs a HostPort from the given string.
NewHostPortWithDefaultPort constructs a HostPort from the given host:port and a port lookup function.
NewMockFromEnv creates a new mock instance.
NewStrings produces a Strings with the default delimiter (",").
NewStringsWithConstraint produces a Strings with a set of allowed values and the default delimiter (",").
NewTestFlagSet creates a new FlagSet suitable for tests.
NewTimestamp creates a new Timestamp with the given default time.
Wrap converts an existing *flag.FlagSet into a FlagSet with no scope.

# Constants

TimestampConversionFencepost represents an integer time value.

# Structs

Choice conforms to the flag.Value and flag.Getter interfaces, and can be used populate a slice of strings from a flag.Flag.
HostPort represents the value of a TCP host:port flag.
MockFromEnv is a mock of FromEnv interface.
MockFromEnvMockRecorder is the mock recorder for MockFromEnv.
Strings conforms to the flag.Value and flag.Getter interfaces, and can be used populate a slice of strings from a flag.Flag.
Timestamp conforms to the flag.Value and flag.Getter interfaces.

# Interfaces

ConstrainedValue is a flag.Value with constraints on it assigned value.
FlagSet represents an optionally scoped *flag.FlagSet.
FromEnv supports operations on a FlagSet based on environment variables.
TestFlagSet represents an optionally scoped FlagSet for tests.