env

package
v0.0.0-...-7429fd7 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefault

func GetDefault(key, defaultValue string) string

GetDefault retrieves the value of the environment variable named by the key. If the value is empty, then it returns defaultValue, otherwise it returns the value of the variable.

func GetDefaultSet

func GetDefaultSet(key, defaultValue string) (string, error)

GetenvDefaultSet retrieves the value of the environment variable named by key. If the value is empty, then it attempts to set key to defaultValue, and returns defaultValue. If key was already set it just returns the that value, and doesn't set it.. It returns an error if it was not able to set it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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