envconfig

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env map[string]string

func Load

func Load(filepath string) Env

Load reads the environment file and reads variables in "key=value" format. Then it read the system environment variables. It returns the combined results in a key value map.

func (Env) Bool

func (env Env) Bool(name string, value bool) bool

Bool returns the boolean value of the environment variable named by the key. If the variable is not present, the default value is returned.

func (Env) Get

func (env Env) Get(key string) string

Get returns the value of the environment variable named by the key.

func (Env) Int

func (env Env) Int(name string, value int) int

Int returns the integer value of the environment variable named by the key. If the variable is not present, the default value is returned.

func (Env) String

func (env Env) String(key, value string) string

String returns the string value of the environment variable named by the key. If the variable is not present, the default value is returned.

Jump to

Keyboard shortcuts

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