Skip to content

thedanielforum/env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go env

Small lib for configuring your go code according to current environment RUN_ENV.

CircleCI Codacy Badge GoDoc

Installation

go get github.com/thedanielforum/env

How to use

To get the current env you should call env.InitEnv() when your application is starting. It is important to call env.InitEnv() or env.SetEnv("the env you want") before calling any og the "IsEnv" functions.

Example

package main

import (
    "fmt"
    "github.com/thedanielforum/env"
)

func init() {
    env.InitEnv()
}

func main() {
    fmt.Println(env.GetEnv().String())
}

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages