env

package
v0.0.0-...-9ee0041 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	// contains filtered or unexported fields
}

Env represents an environment.

func New

func New(data []string) *Env

New returns a new environment filled with initial data.

func (*Env) Data

func (env *Env) Data() []string

Data returns a copy of the slice representing the environment.

func (*Env) Find

func (env *Env) Find(key string) (value string, found bool)

Find retrieves the value of the environment variable named by the given key. The second return value indicates whether the key exists or not

func (*Env) Get

func (env *Env) Get(key string) (value string)

Get retrieves the value of the environment variable named by the given key. The return value will be an empty string if the key is not present

func (*Env) Set

func (env *Env) Set(key string, values ...string)

Set sets the value of the environment variable named by the key.

func (*Env) String

func (env *Env) String() string

String return the string representation of Env data

Jump to

Keyboard shortcuts

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