package
4.0.0-alpha.4
Repository: https://github.com/peterbourgon/ff.git
Documentation: pkg.go.dev

# Functions

DefaultStringFunc is used by [List] and [UniqueList] if no StringFunc is explicitly provided.
NewEnum returns an enum of [ValueType] T, updating the given pointer ptr when set, and which will accept only the provided valid values.
NewEnumParser returns an enum of any comparable type T that can be parsed from a string, and which will accept only the provided valid values.
NewList returns a list of underlying [ValueType] T, which updates the given pointer ptr when set.
NewListParser returns a list of any type T that can be parsed from a string.
NewUniqueList returns a unique list of underlying [ValueType] T, which updates the given pointer ptr when set.
NewUniqueListParser returns a unique list of any comparable type T that can be parsed from a string.
NewValue returns a [Value] of underlying [ValueType] T, which updates the given pointer ptr when set, and which has a default value of the zero value of the type T.
NewValueDefault returns a value of underlying [ValueType] T, which updates the given pointer ptr when set, and which has the given default value def.
NewValueParser returns a value for any type T that can be parsed from a string.
NewValueReflect produces a simple [flag.Value] which updates ptr when set.

# Variables

ErrInvalidValue is returned when a value is set with invalid input.

# Structs

Enum is a generic [flag.Value] that represents one of a fixed set of possible values of any comparable type T.
List is a generic [flag.Value] that represents an ordered list of values.
UniqueList is a [List] that doesn't allow duplicate values.
Value is a generic [flag.Value] that can be set from a string.

# Interfaces

ValueType is a generic type constraint for a specific set of primitive types that are natively supported by this package.