Skip to content

Commit

Permalink
use lo contains function
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Jun 6, 2024
1 parent a103360 commit a22b9ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/liquid.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/Masterminds/sprig/v3"
"github.com/osteele/liquid"
"github.com/pluralsh/polly/algorithms"
"github.com/samber/lo"
)

var (
Expand Down Expand Up @@ -41,7 +41,7 @@ func init() {
}

for name, fnc := range fncs {
if algorithms.Index(excludedFunctions, func(s string) bool { return s == name }) < 0 {
if !lo.Contains(excludedFunctions, name) {
liquidEngine.RegisterFilter(name, fnc)
}
}
Expand Down

0 comments on commit a22b9ff

Please sign in to comment.