8000 GitHub - denismitr/goenv: Go environment variables helper functions
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

denismitr/goenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

GoEnv

Description

Go environment variables helper functions

Usage

Simple strings
foo := goenv.String("SOME_ENV_VAR")
// or
foo := goenv.StringOrDefault("SOME_ENV_VAR", "defaultValue")
// or
foo := MustString("SOME_ENV_VAR") // will panic if not found
Integers
var foo int = goenv.Int("SOME_ENV_VAR")
// or
defaultValue := 5
foo := goenv.IntOrDefault("SOME_ENV_VAR", defaultValue)
// or
foo := MustInt("SOME_ENV_VAR") // will panic if not found
Booleans
var foo bool = goenv.IsTruthy("SOME_ENV_VAR")
// or
foo := goenv.IsFalthy("SOME_ENV_VAR")

About

Go environment variables helper functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0