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 ¶
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).