Discover Packages
github.com/drone/envsubst
package
module
Version:
v1.0.3
Opens a new window with list of versions in this module.
Published: Jun 16, 2021
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 192
Opens a new window with list of known importers.
README
README
¶
envsubst
envsubst
is a Go package for expanding variables in a string using ${var}
syntax.
Includes support for bash string replacement functions.
Documentation
Documentation can be found on GoDoc .
Supported Functions
${var^}
${var^^}
${var,}
${var,,}
${var:position}
${var:position:length}
${var#substring}
${var##substring}
${var%substring}
${var%%substring}
${var/substring/replacement}
${var//substring/replacement}
${var/#substring/replacement}
${var/%substring/replacement}
${#var}
${var=default}
${var:=default}
${var:-default}
Unsupported Functions
${var-default}
${var+default}
${var:?default}
${var:+default}
Expand ▾
Collapse ▴
Documentation
¶
Eval replaces ${var} in the string based on the mapping function.
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.
Template is the representation of a parsed shell format string.
Parse creates a new shell format template and parses the template
definition from string s.
ParseFile creates a new shell format template and parses the template
definition from the named file.
Execute applies a parsed template to the specified data mapping.
Source Files
¶
Directories
¶
cmd
Click to show internal directories.
Click to hide internal directories.