environment

package
v0.0.0-...-5b4bc19 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package environment has a definition of Environment struct with parser. This file just defines Environment struct. For parsers please check parsers.go file.

Package environment has a definition of Environment struct with parser. This file just defines different parsers. For Environment struct please check environment.go file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Options *opts.Options
	// contains filtered or unexported fields
}

Environment is just a thin container on opts.Options which can parse environment variables.

func NewEnvironment

func NewEnvironment(options *opts.Options) (env *Environment, err error)

NewEnvironment returns new Environment struct pointer and error if update failed.

func (*Environment) Parse

func (env *Environment) Parse() (variables map[string]string, err error)

Parse does parsing of the config file according to its ConfigFormat. Returns tuple of map with environment variables (key is the name, value is a, umm, value). Error defines the error.

func (*Environment) String

func (env *Environment) String() string

func (*Environment) Update

func (env *Environment) Update() (err error)

Update does update of stored environment variables set with retrieved data from Parse output and maintains the set of environment variables of current process (which are derived by executed commands).

Jump to

Keyboard shortcuts

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