Skip to content

Extra tools extending usage of go-envconfig library.

License

Notifications You must be signed in to change notification settings

b0ch3nski/go-envconfig-extra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-envconfig-extra

license release go.dev goreportcard issues sourcegraph

Extra tools extending usage of go-envconfig library.

install

go get github.com/b0ch3nski/go-envconfig-extra

example

import "github.com/b0ch3nski/go-envconfig-extra/envconfigext"

type Config struct {
	Password1 string `env:"PASS1,required" secret:"redact"`
	Password2 string `env:"PASS2,required" secret:"mask=4"`

	ArbitraryFile envconfigext.FileContent `env:"FILE"`
	Certificate   envconfigext.X509Cert    `env:"CERT"`
}

func (c Config) String() string {
	return envconfigext.StructFieldScan(c)
}