Unix-like environment variable functions in Go
Go-Environ is a system to implement the similar functionality as environment lists found in all Unix-based OS'. Basically, all the functions found at "man 3 setenv" from a Unix prompt. With some additions to support Go's basic types.
- for convenience, it defaults to "overwrite" from the setenv() context.
- Uses
sync.pool
to efficiently use resources when under heavy load. - get* functions for
bool
,float
, andint
. Index
andContains
functions to check for variable existence.
Using "go get":
go get github.com/codehack/go-environ
Then import from source:
import "github.com/codehack/go-environ"
The full code documentation is located at GoDoc:
http://godoc.org/github.com/codehack/go-environ
Go-Environ is Copyright (c) 2014-present Codehack. Published under MIT License