Discover Packages
github.com/millken/goenv
package
module
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Jul 18, 2022
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Expand ▾
Collapse ▴
Documentation
¶
Bool returns the boolean value represented by the string.
Get a value from the ENV. If it doesn't exist the
default value will be returned.
Int returns the integer value represented by the string.
Load .env files. Files will be loaded in the same order that are received.
Redefined vars will override previously existing values.
IE: envy.Load(".env", "test_env/.env") will result in DIR=test_env
If no arg passed, it will try to load a .env file.
MustGet get a value from the ENV. If it doesn't exist
an error will be returned
MustSet the value into the underlying ENV, as well as envy.
This may return an error if there is a problem setting the
underlying ENV value.
Reload the ENV variables. Useful if
an external ENV manager has been used
Set a value into the ENV. This is NOT permanent. It will
only affect values accessed through envy.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.