Versions in this module Expand all Collapse all v0 v0.5.1 Jul 31, 2020 v0.5.0 Jul 31, 2020 Changes in this version + var ErrNotStruct = errors.New("not a struct") + var ErrNotStructPtr = errors.New("not a pointer to a struct") + func Bind(v interface{}, env ...Env) error + func Dump(v interface{}, opt ...DumpOption) (map[string]string, error) + func Export(v interface{}, opt ...DumpOption) error + func Get(key string, fallback ...string) string + func GetBool(key string, fallback ...bool) bool + func GetDuration(key string, fallback ...time.Duration) time.Duration + func GetFloat(key string, fallback ...float64) float64 + func GetInt(key string, fallback ...int) int + func GetString(key string, fallback ...string) string + func GetUint(key string, fallback ...uint) uint + func VarName(name string) string + type DumpOption func(d *dumper) + var IgnoreZeroValues DumpOption = func(d *dumper) { ... } + func VarNameFunc(fun func(string) string) DumpOption + type Env interface + Lookup func(key string) (string, bool) + var System Env = systemEnv{} + type ErrUnsupported string + func (err ErrUnsupported) Error() string + type MapEnv map[string]string + func (env MapEnv) Lookup(key string) (string, bool) + type Reader struct + func New(env Env) Reader + func (r Reader) Get(key string, fallback ...string) string + func (r Reader) GetBool(key string, fallback ...bool) bool + func (r Reader) GetDuration(key string, fallback ...time.Duration) time.Duration + func (r Reader) GetFloat(key string, fallback ...float64) float64 + func (r Reader) GetInt(key string, fallback ...int) int + func (r Reader) GetString(key string, fallback ...string) string + func (r Reader) GetUint(key string, fallback ...uint) uint