README ¶ EnvConfig for Humans & Robots The main goal — is the clear information about all configuration in one place Usage config.go: package config //go:generate go run github.com/albenik/huenv/cmd/huenv@latest -out confg_unmarshal.go example.com/project/name/config Config type Config struct { ... } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ Variables func Init(conf interface{}, envprefix string) error type Config type KeyError func (e *KeyError) Error() string func (e *KeyError) Unwrap() error Constants ¶ This section is empty. Variables ¶ View Source var ( ErrNotGenerated = errors.New("config code mut be generated before use") ErrOutdated = errors.New("generated config unmarshal code is outdated") ) Functions ¶ func Init ¶ func Init(conf interface{}, envprefix string) error Types ¶ type Config ¶ type Config interface { Envmap() map[string]*unmarshal.Target } type KeyError ¶ type KeyError struct { // contains filtered or unexported fields } func (*KeyError) Error ¶ func (e *KeyError) Error() string func (*KeyError) Unwrap ¶ func (e *KeyError) Unwrap() error Source Files ¶ View all Source files errors.go huenv.go Directories ¶ Show internal Expand all Path Synopsis cmd huenv generator internal version Package version records versioning information about this module. Package version records versioning information about this module. reflector unmarshal Click to show internal directories. Click to hide internal directories.