env

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool added in v0.1.0

func Bool(key string, value bool) bool

Bool returns true if the environment variable key is present, and defaults to value if it is not present.

func Float64

func Float64(key string, value float64) float64

Float64 returns the environment variable for key, and defaults to value if it's not found.

IMPORTANT NOTE - if the env var is not convertable to float64, the value 0.0 will be returned

func Int

func Int(key string, value int) int

Int returns the environment variable for key, and defaults to value if it's not found.

IMPORTANT NOTE - if the env var is not an integer, the value 0 will be returned

func String

func String(key string, value string) string

String returns the environment variable for key, and defaults to value if it's not found.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL