envcfg: github.com/pacien/envcfg Index | Files

package envcfg

import "github.com/pacien/envcfg"

Package envcfg provides environment variable mapping to structs.

Can be used to read configuration parameters from the environment.

Fields for which environment variables can be found are overwritten, otherwise they are left to their previous value.

Can be used, for example, after gcfg to override settings provided in a configuration file.

Index

Package Files

envcfg.go mapper.go

Constants

const (
    TAG     = "env"
    ABS_TAG = "absenv"
    SEP     = "_"
)

Variables

var ErrInvalidConfigStruct = errors.New("invalid parameter: must map to a struct")

func ReadInto Uses

func ReadInto(cfgStruct interface{}) (interface{}, []error)

Package envcfg imports 5 packages (graph). Updated 2020-05-27. Refresh now. Tools for package owners.