Documentation ¶
Overview ¶
Package dotnev provide load .env data to os ENV
Index ¶
- Variables
- func Bool(name string, defVal ...bool) (val bool)
- func ClearLoaded()
- func DontUpperEnvKey()
- func Get(name string, defVal ...string) (val string)
- func Int(name string, defVal ...int) (val int)
- func Load(dir string, filenames ...string) (err error)
- func LoadExists(dir string, filenames ...string) error
- func LoadFromMap(kv map[string]string) (err error)
- func LoadedData() map[string]string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UpperEnvKey change key to upper on set ENV UpperEnvKey = true // DefaultName default file name DefaultName = ".env" // OnlyLoadExists load on file exists OnlyLoadExists bool )
Functions ¶
func ClearLoaded ¶ added in v1.2.0
func ClearLoaded()
ClearLoaded clear the previously set ENV value
func DontUpperEnvKey ¶ added in v1.2.0
func DontUpperEnvKey()
DontUpperEnvKey dont change key to upper on set ENV
func LoadExists ¶
LoadExists only load on file exists
func LoadFromMap ¶
LoadFromMap load data from given string map
func LoadedData ¶ added in v1.2.0
LoadedData get all loaded data by dontenv
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.