Documentation
¶
Overview ¶
Package xii contains helpers for 12 Factor.
Index ¶
Constants ¶
View Source
const ( ExtraSpaces = constError("must not contain leading or trailing spaces") InvalidBoolean = constError("must be either true or false") InvalidInteger = constError("must be a valid integer") IsBlank = constError("must not be blank") NotExported = constError("must be exported") )
Errors used by the package.
Variables ¶
This section is empty.
Functions ¶
func AsBool ¶
AsBool retrieves a boolean value from the environment. Returns an error if the value is missing or invalid.
Types ¶
type BoolOpts ¶
type BoolOpts struct {
Required bool
DefaultValue bool
Help string // short help message if required and not found
}
BoolOpts specifies if a value is required or has a default value.
type IntOpts ¶
type IntOpts struct {
Required bool
DefaultValue int
Help string // short help message if required and not found
}
IntOpts is
type StringOpts ¶
type StringOpts struct {
Required bool
DefaultValue string
Help string // short help message if required and not found
}
StringOpts is
Click to show internal directories.
Click to hide internal directories.