environmenter

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SubAll added in v1.0.33

func SubAll(elems ...string) []string

func Substitue added in v1.0.33

func Substitue(elem string) string

func SubstitueOk added in v1.0.33

func SubstitueOk(elem string) (string, bool)

Types

type Environmenter added in v1.0.33

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

func New added in v1.0.33

func New() *Environmenter

func (*Environmenter) Get added in v1.0.33

Get returns the value of the environment variable for the given name. If no value is found, returns an empty string.

func (*Environmenter) GetAll added in v1.0.33

func (t *Environmenter) GetAll(names ...string) map[string]EnvironmenterContext

Get returns a map of the values of the environment variable names. If no value is found, returns an empty string.

func (*Environmenter) OverrideEnvFileNames added in v1.0.33

func (t *Environmenter) OverrideEnvFileNames(names ...string) *Environmenter

OverrideEnvFilePaths updates the list of patterns used to extract the environment varialbe names

func (*Environmenter) OverrideEnvFilePaths added in v1.0.33

func (t *Environmenter) OverrideEnvFilePaths(paths ...string) *Environmenter

OverrideEnvFilePaths updates the list of patterns used to extract the environment varialbe names

func (*Environmenter) OverridePatterns added in v1.0.33

func (t *Environmenter) OverridePatterns(patterns ...string) *Environmenter

OverridePatterns overrides the list of patterns used to extract the environment varialbe names

func (*Environmenter) Process added in v1.0.33

func (t *Environmenter) Process() error

func (*Environmenter) Substitue added in v1.0.33

func (t *Environmenter) Substitue(elem string) string

func (*Environmenter) SubstitueAll added in v1.0.33

func (t *Environmenter) SubstitueAll(elems ...string) []string

func (*Environmenter) SubstitueOk added in v1.0.33

func (t *Environmenter) SubstitueOk(elem string) (string, bool)

func (*Environmenter) WithData added in v1.0.33

func (t *Environmenter) WithData(source, data string) *Environmenter

WithData overrides environment variable key value pairs of the form:

KEY=VALUE

func (*Environmenter) WithEnvFileDirs added in v1.0.33

func (t *Environmenter) WithEnvFileDirs(paths ...string) *Environmenter

WithPatterns updates the list of patterns used to extract the environment varialbe names

func (*Environmenter) WithEnvFileNames added in v1.0.33

func (t *Environmenter) WithEnvFileNames(names ...string) *Environmenter

WithPatterns updates the list of patterns used to extract the environment varialbe names

func (*Environmenter) WithLines added in v1.0.33

func (t *Environmenter) WithLines(source string, lines ...string) *Environmenter

WithLines overrides environment variable key value pairs of the form:

KEY=VALUE

func (*Environmenter) WithMap added in v1.0.33

func (t *Environmenter) WithMap(source string, environment map[string]string) *Environmenter

Withdata overrides environment variable key value pairs of the form:

KEY=VALUE

func (*Environmenter) WithPatterns added in v1.0.33

func (t *Environmenter) WithPatterns(patterns ...string) *Environmenter

WithPatterns updates the list of patterns used to extract the environment varialbe names

func (*Environmenter) WithSep added in v1.0.33

func (t *Environmenter) WithSep(splitChar string) *Environmenter

WithSep overrides the separater character split key value pairs of the following form:

KEY=VALUE

type EnvironmenterContext added in v1.0.33

type EnvironmenterContext struct {
	Value  string
	Source string
}

Jump to

Keyboard shortcuts

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