Skip to content
rocketbitzPublic

About

an easier to use environment variable package

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages