envconfig – github.com/kelseyhightower/envconfig Index | Files

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

var ErrInvalidSpecification = errors.New("invalid specification must be a struct")

ErrInvalidSpecification indicates that a specification is of the wrong type.

Functions

func Process

func Process(prefix string, spec interface{}) error

Types

type ParseError

type ParseError struct {
	KeyName   string
	FieldName string
	TypeName  string
	Value     string
}

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

doc.go envconfig.go

Version
v1.0.0
Published
Mar 15, 2014
Platform
js/wasm
Imports
6 packages
Last checked
15 hours ago

Tools for package owners.