envsubst: gomodules.xyz/envsubst Index | Files | Directories

package envsubst

import "gomodules.xyz/envsubst"

Index

Package Files

eval.go funcs.go template.go

func Eval Uses

func Eval(s string, mapping func(string) string) (string, error)

Eval replaces ${var} in the string based on the mapping function.

func EvalEnv Uses

func EvalEnv(s string) (string, error)

EvalEnv replaces ${var} in the string according to the values of the current environment variables. References to undefined variables are replaced by the empty string.

func EvalMap Uses

func EvalMap(s string, values map[string]string) (string, error)

func IsValueNotFoundError Uses

func IsValueNotFoundError(v interface{}) bool

type Template Uses

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

Template is the representation of a parsed shell format string.

func Parse Uses

func Parse(s string) (t *Template, err error)

Parse creates a new shell format template and parses the template definition from string s.

func ParseFile Uses

func ParseFile(path string) (*Template, error)

ParseFile creates a new shell format template and parses the template definition from the named file.

func (*Template) Execute Uses

func (t *Template) Execute(mapping func(node string, key string, args []string) (string, []string, error)) (str string, err error)

Execute applies a parsed template to the specified data mapping.

Directories

PathSynopsis
parse
path

Package envsubst imports 11 packages (graph) and is imported by 5 packages. Updated 2019-08-15. Refresh now. Tools for package owners.