Skip to content

Commit

Permalink
remove sprig
Browse files Browse the repository at this point in the history
Signed-off-by: zachaller <[email protected]>
  • Loading branch information
zachaller committed Jun 16, 2023
1 parent cdf8188 commit 8108bb8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/argoproj/argo-rollouts
go 1.19

require (
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/antonmedv/expr v1.12.5
github.com/argoproj/notifications-engine v0.4.0
github.com/argoproj/pkg v0.13.6
Expand Down Expand Up @@ -80,6 +79,7 @@ require (
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20220708192748-b73dcb041214 // indirect
github.com/aws/aws-sdk-go v1.44.116 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.25 // indirect
Expand Down
4 changes: 1 addition & 3 deletions utils/record/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import (
"strings"
"time"

"github.com/Masterminds/sprig"

timeutil "github.com/argoproj/argo-rollouts/utils/time"

"github.com/argoproj/notifications-engine/pkg/api"
Expand Down Expand Up @@ -234,7 +232,7 @@ func NewAPIFactorySettings() api.Settings {
ConfigMapName: NotificationConfigMap,
InitGetVars: func(cfg *api.Config, configMap *corev1.ConfigMap, secret *corev1.Secret) (api.GetVars, error) {
return func(obj map[string]interface{}, dest services.Destination) map[string]interface{} {
return map[string]interface{}{"rollout": obj, "time": timeExprs, "sprig": sprig.GenericFuncMap()}
return map[string]interface{}{"rollout": obj, "time": timeExprs}
}, nil
},
}
Expand Down
2 changes: 0 additions & 2 deletions utils/record/record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,6 @@ func TestNewAPIFactorySettings(t *testing.T) {
rollout := map[string]interface{}{"name": "hello"}
vars := getVars(rollout, services.Destination{})

delete(vars, "sprig") // delete sprig functions because they can not be tested in equality

assert.Equal(t, map[string]interface{}{"rollout": rollout, "time": timeExprs}, vars)
}

Expand Down

0 comments on commit 8108bb8

Please sign in to comment.