The Wayback Machine - https://web.archive.org/web/20190322180511/https://github.com/codercom/env
Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
This repository has been archived by the owner. It is now read-only.
Easily load in many environment variables in Go
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
arg.go
env.go
env_test.go
error.go
requirement.go
requirement_string.go

README.md

Env

GoDoc

A simple package for working with environment variables

Example

var test1 string
var test2 string

if err = env.Env(env.E{
    "TEST_1": env.Optional(&test1),
    "TEST_2": env.Required(&test2),
});

The TEST_2 env variable must be set or err will be populated. The test1 and test2 variables will be populated after Env is ran.

You can’t perform that action at this time.