Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvDocItem ¶
type EnvDocItem struct {
// Name of the environment variable.
Name string
// Doc is a documentation text for the environment variable.
Doc string
// Opts is a set of options for environment variable parsing.
Opts EnvVarOptions
// Children is a list of child environment variables.
Children []*EnvDocItem
}
EnvDocItem is a documentation item for one environment variable.
type EnvScope ¶
type EnvScope struct {
// Name of the scope.
Name string
// Doc is a documentation text for the scope.
Doc string
// Vars is a list of environment variables.
Vars []*EnvDocItem
}
type EnvVarOptions ¶
type EnvVarOptions struct {
// Separator is a separator for array types.
Separator string
// Required is a flag that enables required check.
Required bool
// Expand is a flag that enables environment variable expansion.
Expand bool
// NonEmpty is a flag that enables non-empty check.
NonEmpty bool
// FromFile is a flag that enables reading environment variable from a file.
FromFile bool
// Default is a default value for the environment variable.
Default string
}
EnvVarOptions is a set of options for environment variable parsing.
type TargetType ¶
type TargetType int
TargetType is an env library target.
const ( TargetTypeCaarlos0 TargetType = iota TargetTypeCleanenv )
func ParseTargetType ¶
func ParseTargetType(s string) (TargetType, error)
func (TargetType) String ¶
func (i TargetType) String() string
Click to show internal directories.
Click to hide internal directories.