Skip to content

Commit

Permalink
Allow hermetic Sprig funtions only (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
unguiculus authored May 22, 2020
1 parent f63f68d commit cd84a29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ backendConfigs:
### Templating
Go templating can be used in the config file as follows.
The [Sprig](https://masterminds.github.io/sprig/) function library is included.
Hermetic, i.e. repeatable, functions from the [Sprig](https://masterminds.github.io/sprig/) function library are included.
* In the first templating pass, `globalVarFiles`, `globalVars`, `moduleVarFiles`, `moduleVars`, and `envs` are processed.
All parameters specified under `params` and using the `-p|--param` flag are available in the `.Params` object.
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func load(cfgData []byte) (*fileConfig, error) {

func renderTemplate(data map[string]interface{}, tmpl string) (string, error) {
wr := strings.Builder{}
tpl := template.New("gotpl").Funcs(sprig.TxtFuncMap()).Option("missingkey=error")
tpl := template.New("gotpl").Funcs(sprig.HermeticTxtFuncMap()).Option("missingkey=error")
tpl, err := tpl.Parse(tmpl)
if err != nil {
return "", err
Expand Down

0 comments on commit cd84a29

Please sign in to comment.