Skip to content

Commit

Permalink
Enable all sprig functions in templates (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
endorama authored Feb 23, 2023
1 parent ade5d8b commit 5d1b9a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/genlib/generator_with_text_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewGeneratorWithTextTemplate(tpl []byte, cfg Config, fields Fields) (*Gener

state := NewGenState()

templateFns := sprig.HermeticTxtFuncMap()
templateFns := sprig.TxtFuncMap()

templateFns["timeDuration"] = func(duration int64) time.Duration {
return time.Duration(duration)
Expand Down

0 comments on commit 5d1b9a5

Please sign in to comment.