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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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