Skip to content

Commit e748fbb

Browse files
SCALIBR Teamcopybara-github
SCALIBR Team
authored andcommitted
Switch from github.com/mitchellh/hashstructure to the github.com/gohugoio/hashstructure fork.
PiperOrigin-RevId: 760639537
1 parent ef739e9 commit e748fbb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ require (
1919
github.com/erikvarga/go-rpmdb v0.0.0-20240208180226-b97e041ef9af
2020
github.com/go-git/go-git/v5 v5.14.0
2121
github.com/gobwas/glob v0.2.3
22+
github.com/gohugoio/hashstructure v0.5.0
2223
github.com/google/go-cmp v0.7.0
2324
github.com/google/go-containerregistry v0.19.1
2425
github.com/google/go-cpy v0.0.0-20211218193943-a9c933c06932
2526
github.com/google/uuid v1.6.0
2627
github.com/groob/plist v0.1.1
2728
github.com/mattn/go-sqlite3 v1.14.28
2829
github.com/michaelkedar/xml v0.0.0-20250310223042-5d14c9302b17
29-
github.com/mitchellh/hashstructure/v2 v2.0.2
3030
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
3131
github.com/opencontainers/go-digest v1.0.0
3232
github.com/opencontainers/image-spec v1.1.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
110110
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
111111
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
112112
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
113+
github.com/gohugoio/hashstructure v0.5.0 h1:G2fjSBU36RdwEJBWJ+919ERvOVqAg9tfcYp47K9swqg=
114+
github.com/gohugoio/hashstructure v0.5.0/go.mod h1:Ser0TniXuu/eauYmrwM4o64EBvySxNzITEOLlm4igec=
113115
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
114116
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
115117
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ=
@@ -166,8 +168,6 @@ github.com/michaelkedar/xml v0.0.0-20250310223042-5d14c9302b17 h1:Xt6bVvxym2Vvqb
166168
github.com/michaelkedar/xml v0.0.0-20250310223042-5d14c9302b17/go.mod h1:KUAB0Nhc2O/lzyPLuWF6Jm/HVC4GIRHWpxTWpy14WHM=
167169
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
168170
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
169-
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
170-
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
171171
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
172172
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
173173
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=

testing/fakeenricher/fake_enricher.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ import (
2020
"fmt"
2121
"testing"
2222

23+
"github.com/gohugoio/hashstructure"
2324
"github.com/google/osv-scalibr/enricher"
2425
"github.com/google/osv-scalibr/inventory"
2526
"github.com/google/osv-scalibr/plugin"
26-
"github.com/mitchellh/hashstructure/v2"
2727
)
2828

2929
// Enricher is a fake enricher implementation to be used in tests.
@@ -143,7 +143,7 @@ func Hash(input *enricher.ScanInput, inventory *inventory.Inventory) (uint64, er
143143
Input: input,
144144
Inventory: inventory,
145145
}
146-
return hashstructure.Hash(ii, hashstructure.FormatV2, nil)
146+
return hashstructure.Hash(ii, nil)
147147
}
148148

149149
// MustHash returns a hash of the input and inventory. This is used to match the input and inventory

0 commit comments

Comments
 (0)