huenv

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 7 Imported by: 0

README

EnvConfig for Humans & Robots

CI

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 {
  ...
}

Documentation

Index

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

Directories

Path Synopsis
cmd
internal
version
Package version records versioning information about this module.
Package version records versioning information about this module.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL