envutil

package
v0.0.0-...-d0b943e Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearEnvCache

func ClearEnvCache()

ClearEnvCache clears saved environment values so that a new read access the environment again. (Used for testing)

func EnvOrDefaultBool

func EnvOrDefaultBool(name string, value bool) bool

EnvOrDefaultBool returns the value set by the specified environment variable, if any, otherwise the specified default value.

func EnvOrDefaultBytes

func EnvOrDefaultBytes(name string, value int64) int64

EnvOrDefaultBytes returns the value set by the specified environment variable, if any, otherwise the specified default value.

func EnvOrDefaultDuration

func EnvOrDefaultDuration(name string, value time.Duration) time.Duration

EnvOrDefaultDuration returns the value set by the specified environment variable, if any, otherwise the specified default value.

func EnvOrDefaultInt

func EnvOrDefaultInt(name string, value int) int

EnvOrDefaultInt returns the value set by the specified environment variable, if any, otherwise the specified default value.

func EnvOrDefaultInt64

func EnvOrDefaultInt64(name string, value int64) int64

EnvOrDefaultInt64 returns the value set by the specified environment variable, if any, otherwise the specified default value.

func EnvOrDefaultString

func EnvOrDefaultString(name string, value string) string

EnvOrDefaultString returns the value set by the specified environment variable, if any, otherwise the specified default value.

func GetEnvReport

func GetEnvReport() string

GetEnvReport dumps all configuration variables that may have been used and their value.

func VarName

func VarName(name string) string

VarName returns the name of the environment variable corresponding to a configuration key or command-line flag name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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