env

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

Clear environment

func Expand

func Expand(s string) string

Expand ...

func ExpandEnv

func ExpandEnv(s string, env map[string]string) string

ExpandEnv variable

func ExpandEnvVar

func ExpandEnvVar(key, val string, env map[string]string) string

ExpandEnvVar variables and execute commands, or fallback to global env

func Get

func Get(k string) string

Get environment variable

func GetAll

func GetAll() map[string]string

GetAll environment variables

func Lookup

func Lookup(k string) (string, bool)

Lookup environment variable

func Restore

func Restore(env map[string]string) error

Restore environment

func RestoreOriginal

func RestoreOriginal(env map[string]string) error

RestoreOriginal environment

func Set

func Set(k, v string) error

Set environment variable

func Split

func Split(s string) (string, string)

Split "key=value" into two variables.

func Unset

func Unset(k, v string) error

Unset environment variable

Types

This section is empty.

Jump to

Keyboard shortcuts

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