Skip to content

Commit 92728a8

Browse files
committed
Switch to github.com/mitchellh/hashstructure/v2
Switch to v2. Signed-off-by: Matthias Diester <mddiester@gmail.com>
1 parent bb28eb5 commit 92728a8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/gonvenience/text v1.0.10
1212
github.com/gonvenience/ytbx v1.4.8
1313
github.com/lucasb-eyer/go-colorful v1.3.0
14-
github.com/mitchellh/hashstructure v1.1.0
14+
github.com/mitchellh/hashstructure/v2 v2.0.2
1515
github.com/onsi/ginkgo/v2 v2.28.1
1616
github.com/onsi/gomega v1.39.1
1717
github.com/sergi/go-diff v1.4.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3v
6464
github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A=
6565
github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc=
6666
github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg=
67-
github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0=
68-
github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA=
67+
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
68+
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
6969
github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI=
7070
github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE=
7171
github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28=

pkg/dyff/core.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"github.com/gonvenience/text"
3333
"github.com/gonvenience/ytbx"
3434

35-
"github.com/mitchellh/hashstructure"
35+
"github.com/mitchellh/hashstructure/v2"
3636
yamlv3 "go.yaml.in/yaml/v3"
3737
)
3838

@@ -1091,10 +1091,10 @@ func (compare *compare) calcNodeHash(node *yamlv3.Node) (hash uint64) {
10911091

10921092
switch node.Kind {
10931093
case yamlv3.MappingNode, yamlv3.SequenceNode:
1094-
hash, err = hashstructure.Hash(compare.basicType(node), nil)
1094+
hash, err = hashstructure.Hash(compare.basicType(node), hashstructure.FormatV2, nil)
10951095

10961096
case yamlv3.ScalarNode:
1097-
hash, err = hashstructure.Hash(node.Tag+"/"+node.Value, nil)
1097+
hash, err = hashstructure.Hash(node.Tag+"/"+node.Value, hashstructure.FormatV2, nil)
10981098

10991099
case yamlv3.AliasNode:
11001100
hash = compare.calcNodeHash(followAlias(node))

0 commit comments

Comments
 (0)