Documentation ¶
Overview ¶
Package envconf provides simple functionality for reading configuration from the environment, such as for use within a 12-Factor Application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct { // Prefix, when set, is stripped from the beginning of environment // variables. This value is case-sensitive. Prefix string // TagName is the struct tag name used to read envconf metadata from // struct fields. Defaults to 'conf'. TagName string }
Decoder is a configured configuration decoder.
func (*Decoder) ReadConfig ¶
ReadConfig parses the enironment according to the Decoder configuration, and stores the result in dst.
To use default values, set them in dst before calling ReadConfig().
type ParseError ¶
type ParseError struct { // Field is the name of the target struct field associated with the error. Field string // Err is the underlying error Err error }
ParseError represents a parsing error
func (*ParseError) Cause ¶
func (e *ParseError) Cause() error
Cause satisfies the github.com/pkg/errors.causer interface
func (*ParseError) Error ¶
func (e *ParseError) Error() string
Click to show internal directories.
Click to hide internal directories.