Skip to content
/ env Public

an easier to use environment variable package

License

Notifications You must be signed in to change notification settings

rocketbitz/env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

env CircleCI

an easier to use environment variable package for gophers

installation

as with all other go packages, you know what to do:

go get github.com/rocketbitz/env

usage

go should probably have its own, but it doesn't, so here you are:

package main

import (
	"fmt"

	"github.com/rocketbitz/env"
)

func main() {
    env.SetDefault("DEFAULT_ENV", "default_value")
    env.Get("DEFAULT_ENV")  // "default_value"

    env.Set("DEFAULT_ENV", "explicit_value")
    env.Get("DEFAULT_ENV")  // "explicit_value"

    env.Count() // 1

    env.JSON()
    /*
    [
        {
            "key": "DEFAULT_ENV",
            "value": "explicit_value",
        }
    ]
    */
}

contribute

pr's are welcome. if they're awesome, they'll get reviewed and merged. if they're not, they'll get reviewed and closed, hopefully with a kind comment as to the reason.

license

MIT ...move along, move along.

About

an easier to use environment variable package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages