package envy
import "github.com/gobuffalo/envy"
Index ¶
- func CurrentPackage() string
- func Get(key string, value string) string
- func GoPath() string
- func GoPaths() []string
- func Map() map[string]string
- func MustGet(key string) (string, error)
- func MustSet(key string, value string) error
- func Set(key string, value string)
- func Temp(f func())
Functions ¶
func CurrentPackage ¶
func CurrentPackage() string
func Get ¶
Get a value from the ENV. If it doesn't exist the default value will be returned.
func GoPath ¶
func GoPath() string
GoPath returns the first GOPATH that is set
func GoPaths ¶
func GoPaths() []string
GoPaths returns all possible GOPATHS that are set.
func Map ¶
Map all of the keys/values set in envy.
func MustGet ¶
Get a value from the ENV. If it doesn't exist an error will be returned
func MustSet ¶
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.
func Set ¶
Set a value into the ENV. This is NOT permanent. It will only affect values accessed through envy.
func Temp ¶
func Temp(f func())
Temp makes a copy of the values and allows operation on those values temporarily during the run of the function. At the end of the function run the copy is discarded and the original values are replaced. This is useful for testing.
Source Files ¶
- Version
- v1.0.0
- Published
- May 12, 2017
- Platform
- windows/amd64
- Imports
- 7 packages
- Last checked
- now –
Tools for package owners.