Documentation ¶
Index ¶
- func Bool(key string, fallback ...bool) (value bool)
- func Float(key string, fallback ...float64) (value float64)
- func Get(key string) (value string, exists bool)
- func Int(key string, fallback ...int) (value int)
- func Int64(key string, fallback ...int64) (value int64)
- func Load(dotenv string)
- func Map(spec interface{}) error
- func Set(key string, value interface{}) error
- func String(key string, fallback ...string) (value string)
- func Strings(key string, fallback ...[]string) (value []string)
- func Uint(key string, fallback ...uint) (value uint)
- func Uint64(key string, fallback ...uint64) (value uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get retrieves the string value of the environment variable named by the key. It returns the value, which will be empty if the variable is not present.
func Load ¶
func Load(dotenv string)
Load parses & set the values in the given files into os environment.
func Map ¶
func Map(spec interface{}) error
Map fetches the key/value pair from os.Environ into the given spec. Tags are supported via `env:ACTUAL_OS_KEY`.
func Set ¶
Set stores the value of the environment variable named by the key. It returns an error, if any.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.