Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envars ¶
Envars is a convenience alias
func (Envars) Apply ¶
Apply ops to these Envars and return the resulting Transform.
Envars are not modified.
type Force ¶
Force set/unset an environment variable without preserving or restoring its previous value.
type Op ¶
type Op interface {
fmt.Stringer
Envar() string
// Apply changes to transform.
//
// This may also add/remove extra housekeeping variables to support Revert.
Apply(transform *Transform)
// Revert the changes made by Apply.
Revert(transform *Transform)
// contains filtered or unexported methods
}
Op is an operation on an environment variable.
type Transform ¶
type Transform struct {
// contains filtered or unexported fields
}
Transform encapsulates low-level transformations on an existing environment.
func (*Transform) Changed ¶
Changed returns the set of changed Envars.
If "undo" is true the returned Envars will include undo state.
Click to show internal directories.
Click to hide internal directories.