Skip to content

Commit 5b3d25a

Browse files
authored
fix: migrate away from archived mitchellh modules (#1286)
1 parent 79ed7cf commit 5b3d25a

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ go 1.23.2
44

55
require (
66
github.com/distribution/reference v0.6.0
7-
github.com/mitchellh/hashstructure/v2 v2.0.2
8-
github.com/mitchellh/mapstructure v1.5.0
7+
github.com/go-viper/mapstructure/v2 v2.2.1
8+
github.com/gohugoio/hashstructure v0.5.0
99
github.com/onsi/ginkgo/v2 v2.22.2
1010
github.com/onsi/gomega v1.36.2
1111
github.com/opencontainers/go-digest v1.0.0
@@ -59,6 +59,7 @@ require (
5959
github.com/kylelemons/godebug v1.1.0 // indirect
6060
github.com/magiconair/properties v1.8.7 // indirect
6161
github.com/mailru/easyjson v0.7.7 // indirect
62+
github.com/mitchellh/mapstructure v1.5.0 // indirect
6263
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6364
github.com/modern-go/reflect2 v1.0.2 // indirect
6465
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr
3838
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
3939
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
4040
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
41+
github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
42+
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
4143
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
4244
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
45+
github.com/gohugoio/hashstructure v0.5.0 h1:G2fjSBU36RdwEJBWJ+919ERvOVqAg9tfcYp47K9swqg=
46+
github.com/gohugoio/hashstructure v0.5.0/go.mod h1:Ser0TniXuu/eauYmrwM4o64EBvySxNzITEOLlm4igec=
4347
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
4448
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
4549
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
@@ -81,8 +85,6 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V
8185
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
8286
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
8387
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
84-
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
85-
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
8688
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
8789
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
8890
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=

internal/hash/strings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package hash
33
import (
44
"fmt"
55

6-
"github.com/mitchellh/hashstructure/v2"
6+
"github.com/gohugoio/hashstructure"
77
)
88

99
func NewString(objs ...interface{}) (string, error) {
10-
hash, err := hashstructure.Hash(objs, hashstructure.FormatV2, nil)
10+
hash, err := hashstructure.Hash(objs, nil)
1111
if err != nil {
1212
return "", err
1313
}

internal/operator/decode_hooks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"reflect"
55
"regexp"
66

7-
"github.com/mitchellh/mapstructure"
7+
"github.com/go-viper/mapstructure/v2"
88
)
99

1010
// stringToRegexpHookFunc returns a DecodeHookFunc that converts strings to regexp.Regexp.

internal/operator/operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/mitchellh/mapstructure"
12+
"github.com/go-viper/mapstructure/v2"
1313
"github.com/spf13/pflag"
1414
"github.com/spf13/viper"
1515
eventsv1 "k8s.io/api/events/v1"

0 commit comments

Comments
 (0)