Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingValue = errors.New("missing value") ErrInvalidValue = errors.New("invalid value") )
Functions ¶
func ClearRegister ¶
func ClearRegister()
func ParseFlags ¶
func ParseFlags()
ParseFlags tests if the print-flag was given at the program start and prints the registered environment fields with thier values to stdout using the specified format. Afterwards, the program exits with return code 2.
Types ¶
type F ¶ added in v3.1.0
type F[T FieldType] struct { // contains filtered or unexported fields }
func (*F[T]) Description ¶ added in v3.1.0
func (*F[T]) GetOrDefault ¶ added in v3.1.0
func (f *F[T]) GetOrDefault() T
func (*F[T]) GetRawOrDefault ¶ added in v3.1.0
func (*F[T]) MustGetRaw ¶ added in v3.1.0
type Option ¶
type Option func(*options)
Option defines an Option that can modify the options struct.
func AllowedValues ¶
AllowedValues returns an Option that defines all allowed values for the environment field.
func Description ¶
Description returns an Option that sets the description of the environment field.
Click to show internal directories.
Click to hide internal directories.