Skip to content
/ env Public

Package env provides a convenient way to initialize variables from the environment.

Notifications You must be signed in to change notification settings

andeya/env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

env

Package env provides a convenient way to initialize variables from the environment.

Usage

// If the environment variable `abc` is empty, the default value `15` is returned.
result := env.Int("abc", 15)

println(result==15) // print `true`

// Set the environment variable
os.Setenv("abc", "25")

// Read from the environment variable
env.Parse()

println(result==25) // print `true`

About

Package env provides a convenient way to initialize variables from the environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages