Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateEnv ¶
ValidateEnv validates an environment variable and returns it. If no value is specified, it returns the current value using os.Getenv.
Types ¶
type ListOpts ¶
type ListOpts struct {
// contains filtered or unexported fields
}
ListOpts holds a list of values and a validation function
func NewListOpts ¶
func NewListOpts(validator ValidatorFunc) ListOpts
NewListOpts creates a new ListOpts with the specified validator.
func NewListOptsRef ¶
func NewListOptsRef(values *[]string, validator ValidatorFunc) *ListOpts
NewListOptsRef creates a new ListOpts with the specified values and validator.
type MapOpts ¶
type MapOpts struct {
// contains filtered or unexported fields
}
MapOpts holds a map of values and validation function
func NewMapOpts ¶
func NewMapOpts(validator ValidatorFunc) MapOpts
NewMapOpts creates a new MapOpts with the specified map of values and a validator.
func NewMapOptsRef ¶
func NewMapOptsRef(values *map[string]string, validator ValidatorFunc) *MapOpts
NewMapOptsRef creates a new MapOpts with the specified values and validator.
type ValidatorFunc ¶
ValidatorFunc defines a validator function that returns a validated string and/or an error.
Click to show internal directories.
Click to hide internal directories.