@cryptotaxi247 / netdata-1 / commits / 5761b4048

build(go.d): switch to gohugoio/hashstructure (#19395)

Ilya Mashchenko committed Jan 13, 2025 at 21:35 UTC 5761b404895fe1f9fb6e7184bef12de586600bcb
11 files changed +22 -22
src/go/go.mod
+1 -1
@@ -23,11 +23,11 @@ require (
23 github.com/go-sql-driver/mysql v1.8.1
24 github.com/godbus/dbus/v5 v5.1.0
25 github.com/gofrs/flock v0.12.1
26 + github.com/gohugoio/hashstructure v0.3.0
27 github.com/golang/mock v1.6.0
28 github.com/google/uuid v1.6.0
29 github.com/gorcon/rcon v1.4.0
30 github.com/gosnmp/gosnmp v1.38.0
30 - github.com/ilyam8/hashstructure v1.1.0
31 github.com/jackc/pgx/v4 v4.18.3
32 github.com/jackc/pgx/v5 v5.7.2
33 github.com/jessevdk/go-flags v1.6.1
src/go/go.sum
+2 -2
@@ -120,6 +120,8 @@ github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPh
120 github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
121 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
122 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
123 +github.com/gohugoio/hashstructure v0.3.0 h1:orHavfqnBv0ffQmobOp41Y9HKEMcjrR/8EFAzpngmGs=
124 +github.com/gohugoio/hashstructure v0.3.0/go.mod h1:8ohPTAfQLTs2WdzB6k9etmQYclDUeNsIHGPAFejbsEA=
125 github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
126 github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
127 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -162,8 +164,6 @@ github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
164 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
165 github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
166 github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
165 -github.com/ilyam8/hashstructure v1.1.0 h1:N8t8hzzKLf2Da87XgC/DBYqXUmSbclgx+2cZxS5/klU=
166 -github.com/ilyam8/hashstructure v1.1.0/go.mod h1:LoLuwBSNpZOi3eTMfAqe2i4oW9QkI08e6g1Pci9h7hs=
167 github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
168 github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
169 github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
src/go/plugin/go.d/agent/confgroup/config.go
+1 -1
@@ -11,7 +11,7 @@ import (
11 "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/hostinfo"
12 "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module"
13
14 - "github.com/ilyam8/hashstructure"
14 + "github.com/gohugoio/hashstructure"
15 "gopkg.in/yaml.v2"
16 )
17
src/go/plugin/go.d/agent/discovery/sd/discoverer/dockerd/docker.go
+1 -1
@@ -19,7 +19,7 @@ import (
19 "github.com/docker/docker/api/types"
20 typesContainer "github.com/docker/docker/api/types/container"
21 docker "github.com/docker/docker/client"
22 - "github.com/ilyam8/hashstructure"
22 + "github.com/gohugoio/hashstructure"
23 )
24
25 func NewDiscoverer(cfg Config) (*Discoverer, error) {
src/go/plugin/go.d/agent/discovery/sd/discoverer/kubernetes/kubernetes.go
+1 -1
@@ -15,7 +15,7 @@ import (
15 "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
16 "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/k8sclient"
17
18 - "github.com/ilyam8/hashstructure"
18 + "github.com/gohugoio/hashstructure"
19 corev1 "k8s.io/api/core/v1"
20 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21 "k8s.io/apimachinery/pkg/runtime"
src/go/plugin/go.d/agent/discovery/sd/discoverer/kubernetes/pod_test.go
+4 -4
@@ -119,10 +119,10 @@ func TestPodTarget_Hash(t *testing.T) {
119 }
120 },
121 wantHashes: []uint64{
122 - 12703169414253998055,
123 - 13351713096133918928,
124 - 8241692333761256175,
125 - 11562466355572729519,
122 + 12448367577781070857,
123 + 14383147416909666398,
124 + 15844848658936368667,
125 + 10371342506191352910,
126 },
127 },
128 }
src/go/plugin/go.d/agent/discovery/sd/discoverer/kubernetes/service_test.go
+4 -4
@@ -118,10 +118,10 @@ func TestServiceTarget_Hash(t *testing.T) {
118 }
119 },
120 wantHashes: []uint64{
121 - 17611803477081780974,
122 - 6019985892433421258,
123 - 4151907287549842238,
124 - 5757608926096186119,
121 + 7927590792385601508,
122 + 11876820484195315354,
123 + 12042303898632345558,
124 + 12464836168762314838,
125 },
126 },
127 }
src/go/plugin/go.d/agent/discovery/sd/discoverer/netlisteners/netlisteners.go
+1 -1
@@ -20,7 +20,7 @@ import (
20 "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
21 "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt"
22
23 - "github.com/ilyam8/hashstructure"
23 + "github.com/gohugoio/hashstructure"
24 )
25
26 var (
src/go/plugin/go.d/agent/discovery/sd/pipeline/pipeline_test.go
+1 -1
@@ -14,7 +14,7 @@ import (
14 "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup"
15 "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/model"
16
17 - "github.com/ilyam8/hashstructure"
17 + "github.com/gohugoio/hashstructure"
18 "github.com/stretchr/testify/assert"
19 "github.com/stretchr/testify/require"
20 "gopkg.in/yaml.v2"
src/go/plugin/go.d/agent/filestatus/manager_test.go
+3 -3
@@ -45,10 +45,10 @@ func TestManager_Run(t *testing.T) {
45 wantFile: `
46 {
47 "module1": {
48 - "name1:5956328514325012774": "ok"
48 + "name1:17896517344060997937": "ok"
49 },
50 "module2": {
51 - "name2:14684454322123948394": "ok"
51 + "name2:14519194242031159283": "ok"
52 }
53 }
54 `,
@@ -71,7 +71,7 @@ func TestManager_Run(t *testing.T) {
71 wantFile: `
72 {
73 "module1": {
74 - "name1:5956328514325012774": "ok"
74 + "name1:17896517344060997937": "ok"
75 }
76 }
77 `,
src/go/plugin/go.d/agent/filestatus/store_test.go
+3 -3
@@ -40,7 +40,7 @@ func TestStore_add(t *testing.T) {
40 prepare: func() *Store {
41 return &Store{
42 items: map[string]map[string]string{
43 - "modName": {"jobName:18299273693089411682": "state"},
43 + "modName": {"jobName:14246646561040761746": "state"},
44 },
45 }
46 },
@@ -97,8 +97,8 @@ func TestStore_remove(t *testing.T) {
97 return &Store{
98 items: map[string]map[string]string{
99 "modName": {
100 - "jobName:18299273693089411682": "state",
101 - "jobName:18299273693089411683": "state",
100 + "jobName:14246646561040761746": "state",
101 + "jobName:14246646561040761747": "state",
102 },
103 },
104 }