package envconfig
import "github.com/kelseyhightower/envconfig"
Package envconfig implements decoding of environment variables based on a user defined specification. A typical use is using environment variables for configuration settings.
Index ¶
- Variables
- func MustProcess(prefix string, spec interface{})
- func Process(prefix string, spec interface{}) error
- type ParseError
Variables ¶
ErrInvalidSpecification indicates that a specification is of the wrong type.
Functions ¶
func MustProcess ¶
func MustProcess(prefix string, spec interface{})
MustProcess is the same as Process but panics if an error occurs
func Process ¶
Process populates the specified struct based on environment variables
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
Source Files ¶
- Version
- v1.1.0
- Published
- Mar 4, 2016
- Platform
- windows/amd64
- Imports
- 7 packages
- Last checked
- 2 days ago –
Tools for package owners.