Documentation ¶
Overview ¶
Package env makes it possible to track use of environment variables within a procress in order to generate documentation for these uses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoolVar ¶
type BoolVar struct {
Var
}
BoolVar represents a single boolean environment variable.
func RegisterBoolVar ¶
RegisterBoolVar registers a new boolean environment variable.
type DurationVar ¶
type DurationVar struct {
Var
}
DurationVar represents a single duration environment variable.
func RegisterDurationVar ¶
func RegisterDurationVar(name string, defaultValue time.Duration, description string) DurationVar
RegisterDurationVar registers a new duration environment variable.
func (DurationVar) Get ¶
func (v DurationVar) Get() time.Duration
type FloatVar ¶
type FloatVar struct {
Var
}
FloatVar represents a single floating-point environment variable.
func RegisterFloatVar ¶
RegisterFloatVar registers a new floating-point environment variable.
type IntVar ¶
type IntVar struct {
Var
}
IntVar represents a single integer environment variable.
func RegisterIntVar ¶
RegisterIntVar registers a new integer environment variable.
type StringVar ¶
type StringVar struct {
Var
}
StringVar represents a single string environment variable.
func RegisterStringVar ¶
RegisterStringVar registers a new string environment variable.
type Var ¶
type Var struct { // The name of the environment variable. Name string // The optional default value of the environment variable. DefaultValue string // Description of the environment variable's purpose. Description string // Hide the existence of this variable when outputting usage information. Hidden bool // Mark this variable as deprecated when generating usage information. Deprecated bool // The type of the variable's value Type VarType }
Var describes a single environment variable
func VarDescriptions ¶
func VarDescriptions() []Var
Returns a description of this process' environment variables, sorted by name.