Documentation ¶
Index ¶
- func SubAll(elems ...string) []string
- func Substitue(elem string) string
- func SubstitueOk(elem string) (string, bool)
- type Environmenter
- func (t *Environmenter) Get(name string) (EnvironmenterContext, bool)
- func (t *Environmenter) GetAll(names ...string) map[string]EnvironmenterContext
- func (t *Environmenter) OverrideEnvFileNames(names ...string) *Environmenter
- func (t *Environmenter) OverrideEnvFilePaths(paths ...string) *Environmenter
- func (t *Environmenter) OverridePatterns(patterns ...string) *Environmenter
- func (t *Environmenter) Process() error
- func (t *Environmenter) Substitue(elem string) string
- func (t *Environmenter) SubstitueAll(elems ...string) []string
- func (t *Environmenter) SubstitueOk(elem string) (string, bool)
- func (t *Environmenter) WithData(source, data string) *Environmenter
- func (t *Environmenter) WithEnvFileDirs(paths ...string) *Environmenter
- func (t *Environmenter) WithEnvFileNames(names ...string) *Environmenter
- func (t *Environmenter) WithLines(source string, lines ...string) *Environmenter
- func (t *Environmenter) WithMap(source string, environment map[string]string) *Environmenter
- func (t *Environmenter) WithPatterns(patterns ...string) *Environmenter
- func (t *Environmenter) WithSep(splitChar string) *Environmenter
- type EnvironmenterContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SubstitueOk ¶ added in v1.0.33
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
func (t *Environmenter) Get(name string) (EnvironmenterContext, bool)
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