Documentation ¶
Index ¶
Constants ¶
View Source
const ( // use a specified env var instead of one derived from struct field name A_ALIAS = "alias" // default value is used if env var is not specified A_DEFAULT = "default" // an error is returned if a required field has no associated env var A_REQUIRE = "require" // do not set the named field from any env var A_IGNORE = "ignore" )
Tag atttributes to specify how to handle env vars
Variables ¶
View Source
var ( ErrNeedPrefix = errors.New("a prefix must be provided") ErrBadSpec = errors.New("specification must be a struct pointer") )
returned errs
Functions ¶
Types ¶
type ParseError ¶
A ParseError occurs when an environment variable cannot be converted to the type required by a struct field during assignment.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
Click to show internal directories.
Click to hide internal directories.