env

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string, def ...string) string

Get retrieves the value of the environment variable named by the key. It returns the value, which will be empty if the variable is not present. If value is empty and a default value is passed it will be returned instead.

func Load

func Load(files ...string) error

Load .env files using godotenv package.

func Set

func Set(key string, value interface{}) error

Set sets the value of the environment variable named by the key. It returns an error, if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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