From a22b9ffedfa20c86f6cc0bc57885df8ab7f86e12 Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Thu, 6 Jun 2024 16:07:05 +0200 Subject: [PATCH] use lo contains function --- template/liquid.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/liquid.go b/template/liquid.go index 2c3ac00..a7e93ba 100644 --- a/template/liquid.go +++ b/template/liquid.go @@ -5,7 +5,7 @@ import ( "github.com/Masterminds/sprig/v3" "github.com/osteele/liquid" - "github.com/pluralsh/polly/algorithms" + "github.com/samber/lo" ) var ( @@ -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) } }