envim: github.com/cuonglm/envim Index | Files

package envim

import "github.com/cuonglm/envim"

Index

Package Files

envim.go

func Clear Uses

func Clear()

Clear cleans environment

func FromMap Uses

func FromMap(m map[string]string)

FromMap populates environment with key-value pair from map m A pair with invalid key/value will be skipped

func Get Uses

func Get(key string) string

Get gets value of environment variable named key Returns empty string if variable is not set

func IsSet Uses

func IsSet(key string) bool

IsSet check variable is set or not

func Map Uses

func Map() map[string]string

Map returns a map contains environment variable key-value pair

func MapWithPrefix Uses

func MapWithPrefix(prefix string) map[string]string

MapWithPrefix like Map(), but only contains key start with prefix

func Set Uses

func Set(key, value string) error

Set sets environment variable named key new value. Returns an error if occurred.

func Unset Uses

func Unset(key string) error

Unset unsets an environment variable Returns an error if occurred.

Package envim imports 2 packages (graph). Updated 2019-10-21. Refresh now. Tools for package owners.