Skip to content

Commit

Permalink
fix sprig funcmap
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 committed Oct 2, 2024
1 parent c44041b commit 7d5dd3c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/funcmap/funcmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ import (
)

var FuncMap = func() template.FuncMap {
fm := sprig.HermeticTxtFuncMap()
for name, fn := range funcMap {
fm := sprig.TxtFuncMap()

for name, fn := range extraFuncMap {
fm[name] = fn
}

return fm
}()

var funcMap = map[string]interface{}{
var extraFuncMap = map[string]interface{}{
"glob": globAny,
"re": regexpAny,
}
Expand Down

0 comments on commit 7d5dd3c

Please sign in to comment.