@cryptotaxi247 / netdata-1 / commits / d048db5c1

build(deps): bump k8s.io modules to v0.36.1 (#22505)

Ilya Mashchenko committed May 18, 2026 at 18:01 UTC d048db5c1ef4211e8061f266c49e93ee066e283f
36 files changed +365 -410
.github/workflows/build.yml
+1 -1
@@ -368,7 +368,7 @@ jobs:
368 if: needs.file-check.outputs.run == 'true'
369 uses: actions/setup-go@v6
370 with:
371 - go-version: "^1.25"
371 + go-version: "^1.26"
372 - name: Set Up Dependencies
373 id: deps
374 if: needs.file-check.outputs.run == 'true'
netdata.spec.in
+2 -2
@@ -323,9 +323,9 @@ BuildRequires: cups-devel
323 # distro handling of versioning).
324 %if %{?_upstream_go_toolchain:0}%{!?_upstream_go_toolchain:1}
325 %if 0%{?suse_version}
326 -BuildRequires: go >= 1.25
326 +BuildRequires: go >= 1.26
327 %else
328 -BuildRequires: golang >= 1.25
328 +BuildRequires: golang >= 1.26
329 %endif
330 %endif
331 # end - go.d.plugin plugin dependencies
src/go/go.mod
+30 -31
@@ -1,6 +1,6 @@
1 module github.com/netdata/netdata/go/plugins
2
3 -go 1.25.7
3 +go 1.26.0
4
5 replace github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.302.0
6
@@ -62,9 +62,9 @@ require (
62 gopkg.in/ini.v1 v1.67.2
63 gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.2
64 gopkg.in/yaml.v2 v2.4.0
65 - k8s.io/api v0.34.3
66 - k8s.io/apimachinery v0.34.3
67 - k8s.io/client-go v0.34.3
65 + k8s.io/api v0.36.1
66 + k8s.io/apimachinery v0.36.1
67 + k8s.io/client-go v0.36.1
68 layeh.com/radius v0.0.0-20190322222518-890bc1058917
69 )
70
@@ -86,14 +86,14 @@ require (
86
87 require (
88 cloud.google.com/go/compute/metadata v0.9.0 // indirect
89 - dario.cat/mergo v1.0.1 // indirect
89 + dario.cat/mergo v1.0.2 // indirect
90 filippo.io/edwards25519 v1.2.0 // indirect
91 github.com/Azure/azure-sdk-for-go/sdk/internal v1.12.0 // indirect
92 github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
93 github.com/Azure/go-ntlmssp v0.1.1 // indirect
94 - github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 // indirect
94 + github.com/AzureAD/microsoft-authentication-library-for-go v1.7.2 // indirect
95 github.com/Masterminds/goutils v1.1.1 // indirect
96 - github.com/Masterminds/semver/v3 v3.3.0 // indirect
96 + github.com/Masterminds/semver/v3 v3.5.0 // indirect
97 github.com/Microsoft/go-winio v0.6.1 // indirect
98 github.com/containerd/errdefs v1.0.0 // indirect
99 github.com/containerd/errdefs/pkg v0.3.0 // indirect
@@ -103,7 +103,7 @@ require (
103 github.com/distribution/reference v0.5.0 // indirect
104 github.com/dlclark/regexp2 v1.11.4 // indirect
105 github.com/docker/go-connections v0.4.0 // indirect
106 - github.com/emicklei/go-restful/v3 v3.12.2 // indirect
106 + github.com/emicklei/go-restful/v3 v3.13.0 // indirect
107 github.com/felixge/httpsnoop v1.0.4 // indirect
108 github.com/fxamacker/cbor/v2 v2.9.0 // indirect
109 github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
@@ -124,21 +124,20 @@ require (
124 github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect
125 github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
126 github.com/huandu/xstrings v1.5.0 // indirect
127 - github.com/ibmruntimes/go-recordio/v2 v2.0.0-20240416213906-ae0ad556db70 // indirect
127 + github.com/ibmruntimes/go-recordio/v2 v2.0.0-20260316030125-5f5b8d0a3634 // indirect
128 github.com/jackc/pgpassfile v1.0.0 // indirect
129 github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
130 github.com/jackc/puddle/v2 v2.2.2 // indirect
131 github.com/josharian/intern v1.0.0 // indirect
132 - github.com/josharian/native v1.1.0 // indirect
132 github.com/json-iterator/go v1.1.12 // indirect
133 github.com/kamstrup/intmap v0.5.2 // indirect
134 github.com/klauspost/compress v1.17.11 // indirect
135 github.com/kylelemons/godebug v1.1.0 // indirect
136 github.com/likexian/gokit v0.25.16 // indirect
137 github.com/mailru/easyjson v0.9.0 // indirect
139 - github.com/mdlayher/genetlink v1.3.2 // indirect
140 - github.com/mdlayher/netlink v1.7.2 // indirect
141 - github.com/mdlayher/socket v0.4.1 // indirect
138 + github.com/mdlayher/genetlink v1.4.0 // indirect
139 + github.com/mdlayher/netlink v1.11.2 // indirect
140 + github.com/mdlayher/socket v0.6.0 // indirect
141 github.com/mitchellh/copystructure v1.2.0 // indirect
142 github.com/mitchellh/reflectwalk v1.0.2 // indirect
143 github.com/moby/docker-image-spec v1.3.1 // indirect
@@ -150,18 +149,18 @@ require (
149 github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
150 github.com/opencontainers/go-digest v1.0.0 // indirect
151 github.com/opencontainers/image-spec v1.0.2 // indirect
153 - github.com/opentracing/opentracing-go v1.1.0 // indirect
154 - github.com/oschwald/maxminddb-golang/v2 v2.1.1 // indirect
152 + github.com/opentracing/opentracing-go v1.2.0 // indirect
153 + github.com/oschwald/maxminddb-golang/v2 v2.3.0 // indirect
154 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
155 github.com/pkg/errors v0.9.1 // indirect
156 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
157 github.com/prometheus/client_model v0.6.2 // indirect
158 github.com/shopspring/decimal v1.4.0 // indirect
160 - github.com/sirupsen/logrus v1.9.3 // indirect
161 - github.com/spf13/cast v1.7.0 // indirect
162 - github.com/spf13/pflag v1.0.6 // indirect
163 - github.com/tidwall/match v1.1.1 // indirect
164 - github.com/tidwall/pretty v1.2.0 // indirect
159 + github.com/sirupsen/logrus v1.9.4 // indirect
160 + github.com/spf13/cast v1.10.0 // indirect
161 + github.com/spf13/pflag v1.0.9 // indirect
162 + github.com/tidwall/match v1.2.0 // indirect
163 + github.com/tidwall/pretty v1.2.1 // indirect
164 github.com/x448/float16 v0.8.4 // indirect
165 github.com/xdg-go/pbkdf2 v1.0.0 // indirect
166 github.com/xdg-go/scram v1.1.2 // indirect
@@ -178,22 +177,22 @@ require (
177 go.yaml.in/yaml/v2 v2.4.3 // indirect
178 go.yaml.in/yaml/v3 v3.0.4 // indirect
179 golang.org/x/crypto v0.51.0 // indirect
181 - golang.org/x/mod v0.35.0 // indirect
180 + golang.org/x/mod v0.36.0 // indirect
181 golang.org/x/oauth2 v0.34.0 // indirect
182 golang.org/x/sys v0.44.0 // indirect
183 golang.org/x/term v0.43.0 // indirect
185 - golang.org/x/time v0.9.0 // indirect
186 - golang.org/x/tools v0.44.0 // indirect
187 - golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b // indirect
188 - google.golang.org/protobuf v1.36.11 // indirect
184 + golang.org/x/time v0.14.0 // indirect
185 + golang.org/x/tools v0.45.0 // indirect
186 + golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb // indirect
187 + google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
188 gopkg.in/cenkalti/backoff.v2 v2.2.1 // indirect
190 - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
189 + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
190 gopkg.in/inf.v0 v0.9.1 // indirect
192 - k8s.io/klog/v2 v2.130.1 // indirect
193 - k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
194 - k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
195 - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
191 + k8s.io/klog/v2 v2.140.0 // indirect
192 + k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
193 + k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
194 + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
195 sigs.k8s.io/randfill v1.0.0 // indirect
197 - sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
196 + sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
197 sigs.k8s.io/yaml v1.6.0 // indirect
198 )
src/go/go.sum
+58 -69
@@ -4,8 +4,8 @@ cloud.google.com/go/auth/oauth2adapt v0.2.7 h1:/Lc7xODdqcEw8IrZ9SvwnlLX6j9FHQM74
4 cloud.google.com/go/auth/oauth2adapt v0.2.7/go.mod h1:NTbTTzfvPl1Y3V1nPpOgl2w6d/FjO7NNUQaWSox6ZMc=
5 cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs=
6 cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
7 -dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
8 -dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
7 +dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8=
8 +dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA=
9 filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo=
10 filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc=
11 github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.1 h1:jHb/wfvRikGdxMXYV3QG/SzUOPYN9KEUUuC0Yd0/vC0=
@@ -30,14 +30,14 @@ github.com/Azure/go-ntlmssp v0.1.1 h1:l+FM/EEMb0U9QZE7mKNEDw5Mu3mFiaa2GKOoTSsNDP
30 github.com/Azure/go-ntlmssp v0.1.1/go.mod h1:NYqdhxd/8aAct/s4qSYZEerdPuH1liG2/X9DiVTbhpk=
31 github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM=
32 github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE=
33 -github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs=
34 -github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk=
33 +github.com/AzureAD/microsoft-authentication-library-for-go v1.7.2 h1:RHK7bS+HQMslb1sZpAokUt+zTVmue0hKSs2C791hhzU=
34 +github.com/AzureAD/microsoft-authentication-library-for-go v1.7.2/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk=
35 github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
36 github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
37 github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
38 github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
39 -github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0=
40 -github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
39 +github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE=
40 +github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
41 github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
42 github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
43 github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
@@ -103,8 +103,8 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh
103 github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
104 github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
105 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
106 -github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU=
107 -github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
106 +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes=
107 +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
108 github.com/facebook/time v0.0.0-20250211113239-e3e1421a0980 h1:jxAsxgSZ+7KqDS8MsSvoOHw7XJfkzmM+jwPPgthzOGc=
109 github.com/facebook/time v0.0.0-20250211113239-e3e1421a0980/go.mod h1:6Fcpck9qC/7PIHUM5/llrFNZnDzosibanENzYRadZeg=
110 github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
@@ -136,8 +136,6 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr
136 github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
137 github.com/go-sql-driver/mysql v1.10.0 h1:Q+1LV8DkHJvSYAdR83XzuhDaTykuDx0l6fkXxoWCWfw=
138 github.com/go-sql-driver/mysql v1.10.0/go.mod h1:M+cqaI7+xxXGG9swrdeUIoPG3Y3KCkF0pZej+SK+nWk=
139 -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
140 -github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
139 github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
140 github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
141 github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
@@ -167,8 +165,6 @@ github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7O
165 github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
166 github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
167 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
170 -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg=
171 -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
168 github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
169 github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
170 github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
@@ -195,8 +191,8 @@ github.com/ibm-messaging/mq-golang/v5 v5.7.1 h1:CSITrun6yG3uOY/FHhYjapBiE+psz6zM
191 github.com/ibm-messaging/mq-golang/v5 v5.7.1/go.mod h1:xCV0vl1+ik3VyWZnwAj++2J89vSTzhXP1gXhG0X3IYE=
192 github.com/ibmdb/go_ibm_db v0.5.4 h1:cveEOt1J2PoQivQdxIQB0f8ugDJYKaSmh7RUKAaJyAE=
193 github.com/ibmdb/go_ibm_db v0.5.4/go.mod h1:BA12Alfe+h5BMGZGE+b0pqP4leILZkpoxe5qr/iMoHw=
198 -github.com/ibmruntimes/go-recordio/v2 v2.0.0-20240416213906-ae0ad556db70 h1:muF5XqVkHnMdbMDXusPdKtuT8qWzefBgSuLH1JVHcC4=
199 -github.com/ibmruntimes/go-recordio/v2 v2.0.0-20240416213906-ae0ad556db70/go.mod h1:NSpUK0x9IyEoM1EjTp2/S8ErxZfRHoA2DfwiYobFSkc=
194 +github.com/ibmruntimes/go-recordio/v2 v2.0.0-20260316030125-5f5b8d0a3634 h1:hNqSwr82ttA5vO6q+bICpbgJuzO1sxwjDlJQuaGWcbY=
195 +github.com/ibmruntimes/go-recordio/v2 v2.0.0-20260316030125-5f5b8d0a3634/go.mod h1:NSpUK0x9IyEoM1EjTp2/S8ErxZfRHoA2DfwiYobFSkc=
196 github.com/ilyam8/gosnmp v0.0.0-20250912202722-388b2cb5192e h1:3f1r8AJrTdUWUVa4H4tRYmJAEEmnsU5COu4ycVOCAjo=
197 github.com/ilyam8/gosnmp v0.0.0-20250912202722-388b2cb5192e/go.mod h1:CxVS6bXqmWZlafUj9pZUnQX5e4fAltqPcijxWpCitDo=
198 github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
@@ -225,8 +221,6 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y
221 github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
222 github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
223 github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
228 -github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA=
229 -github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
224 github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
225 github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
226 github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
@@ -270,12 +264,12 @@ github.com/mattn/go-xmlrpc v0.0.3 h1:Y6WEMLEsqs3RviBrAa1/7qmbGB7DVD3brZIbqMbQdGY
264 github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA=
265 github.com/maxmind/mmdbwriter v1.2.0 h1:hyvDopImmgvle3aR8AaddxXnT0iQH2KWJX3vNfkwzYM=
266 github.com/maxmind/mmdbwriter v1.2.0/go.mod h1:EQmKHhk2y9DRVvyNxwCLKC5FrkXZLx4snc5OlLY5XLE=
273 -github.com/mdlayher/genetlink v1.3.2 h1:KdrNKe+CTu+IbZnm/GVUMXSqBBLqcGpRDa0xkQy56gw=
274 -github.com/mdlayher/genetlink v1.3.2/go.mod h1:tcC3pkCrPUGIKKsCsp0B3AdaaKuHtaxoJRz3cc+528o=
275 -github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g=
276 -github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw=
277 -github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U=
278 -github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA=
267 +github.com/mdlayher/genetlink v1.4.0 h1:f/Xs7Y2T+GyX9b3dbiUhnLE9InGs5F9RxJ2JwBMl71o=
268 +github.com/mdlayher/genetlink v1.4.0/go.mod h1:d1hrKr8fwZU2JkcAtQUAzeTrI7nbgQSl+5k1cC0biSA=
269 +github.com/mdlayher/netlink v1.11.2 h1:HKh2jqe+omdSWcQ88nrT7INE61B0NXfiSPFdgL4YbNI=
270 +github.com/mdlayher/netlink v1.11.2/go.mod h1:uT2Yc/QLaZubzDpZIBi9d4GoeLwtp3x1AMeqSRrK2sA=
271 +github.com/mdlayher/socket v0.6.0 h1:ScZPaAGyO1icQnbFrhPM8mnXyMu9qukC1K4ZoM2IQKU=
272 +github.com/mdlayher/socket v0.6.0/go.mod h1:q7vozUAnxSqnjHc12Fik5yUKIzfZ8ITCfMkhOtE9z18=
273 github.com/microsoft/go-mssqldb v1.10.0 h1:pHEt+Qz6YFPWqREq10mqSE524QQo+/QremwTCQht7TY=
274 github.com/microsoft/go-mssqldb v1.10.0/go.mod h1:mnG7lGa9iYJbzJqGCXyuQCegStKMr3kogDLD6+bmggg=
275 github.com/miekg/dns v1.1.72 h1:vhmr+TF2A3tuoGNkLDFK9zi36F2LS+hKTRW0Uf8kbzI=
@@ -312,24 +306,20 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+
306 github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
307 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
308 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
315 -github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU=
309 github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
317 -github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM=
318 -github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
310 github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
311 github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
321 -github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4=
322 -github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog=
312 github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
313 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
314 github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
315 github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
327 -github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
316 github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
317 +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
318 +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
319 github.com/oschwald/maxminddb-golang v1.13.1 h1:G3wwjdN9JmIK2o/ermkHM+98oX5fS+k5MbwsmL4MRQE=
320 github.com/oschwald/maxminddb-golang v1.13.1/go.mod h1:K4pgV9N/GcK694KSTmVSDTODk4IsCNThNdTmnaBZ/F8=
331 -github.com/oschwald/maxminddb-golang/v2 v2.1.1 h1:lA8FH0oOrM4u7mLvowq8IT6a3Q/qEnqRzLQn9eH5ojc=
332 -github.com/oschwald/maxminddb-golang/v2 v2.1.1/go.mod h1:PLdx6PR+siSIoXqqy7C7r3SB3KZnhxWr1Dp6g0Hacl8=
321 +github.com/oschwald/maxminddb-golang/v2 v2.3.0 h1:PnXjMGjkSQlwOBSyZ7hk6Fd75t7erkAhJNJgEhA3MQU=
322 +github.com/oschwald/maxminddb-golang/v2 v2.3.0/go.mod h1:NSQvgFwPxODpBTJI5+5Ns1AAucnx7ggW9PSRRifAT1s=
323 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
324 github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
325 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -366,14 +356,14 @@ github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+D
356 github.com/sijms/go-ora/v2 v2.9.0 h1:+iQbUeTeCOFMb5BsOMgUhV8KWyrv9yjKpcK4x7+MFrg=
357 github.com/sijms/go-ora/v2 v2.9.0/go.mod h1:QgFInVi3ZWyqAiJwzBQA+nbKYKH77tdp1PYoCqhR2dU=
358 github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
369 -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
370 -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
359 +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=
360 +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=
361 github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
362 github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
373 -github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w=
374 -github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
375 -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
376 -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
363 +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
364 +github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
365 +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
366 +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
367 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
368 github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
369 github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
@@ -391,10 +381,10 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
381 github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
382 github.com/tidwall/gjson v1.19.0 h1:xwxm7n691Uf3u5OFjzngavjGTh55KX5q/9w9xHW88JU=
383 github.com/tidwall/gjson v1.19.0/go.mod h1:V37/opeE/JbLUOfH0QTXiNez2l0RUjYUhpT4szFQAfc=
394 -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
395 -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
396 -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
397 -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
384 +github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM=
385 +github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
386 +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
387 +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
388 github.com/valyala/fastjson v1.6.10 h1:/yjJg8jaVQdYR3arGxPE2X5z89xrlhS0eGXdv+ADTh4=
389 github.com/valyala/fastjson v1.6.10/go.mod h1:e6FubmQouUNP73jtMLmcbxS6ydWIpOfhz34TSfO3JaE=
390 github.com/vmware/govmomi v0.54.0 h1:akEKkM9XKMOhTskmdzTLG8JzH+sh61jbFrVPbAzv5IQ=
@@ -460,8 +450,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
450 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
451 golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
452 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
463 -golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=
464 -golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=
453 +golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4=
454 +golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ=
455 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
456 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
457 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -494,7 +484,6 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
484 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
485 golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
486 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
497 -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
487 golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
488 golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
489 golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
@@ -509,22 +498,22 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
498 golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
499 golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
500 golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
512 -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
513 -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
501 +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=
502 +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
503 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
504 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
505 golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
506 golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
507 golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
508 golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
520 -golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c=
521 -golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI=
509 +golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8=
510 +golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0=
511 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
512 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
513 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
514 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
526 -golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b h1:J1CaxgLerRR5lgx3wnr6L04cJFbWoceSK9JWBdglINo=
527 -golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b/go.mod h1:tqur9LnfstdR9ep2LaJT4lFUl0EjlHtge+gAjmsHUG4=
515 +golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb h1:whnFRlWMcXI9d+ZbWg+4sHnLp52d5yiIPUxMBSt4X9A=
516 +golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb/go.mod h1:rpwXGsirqLqN2L0JDJQlwOboGHmptD5ZD6T2VmcqhTw=
517 golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220504211119-3d4a969bb56b h1:9JncmKXcUwE918my+H6xmjBdhK2jM/UTUNXxhRG1BAk=
518 golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220504211119-3d4a969bb56b/go.mod h1:yp4gl6zOlnDGOZeWeDfMwQcsdOIQnMdhuPx9mwwWBL4=
519 google.golang.org/api v0.218.0 h1:x6JCjEWeZ9PFCRe9z0FBrNwj7pB7DOAqT35N+IPnAUA=
@@ -536,8 +525,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:
525 google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
526 google.golang.org/grpc v1.79.1 h1:zGhSi45ODB9/p3VAawt9a+O/MULLl9dpizzNNpq7flY=
527 google.golang.org/grpc v1.79.1/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ=
539 -google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
540 -google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
528 +google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI=
529 +google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
530 gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
531 gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII=
532 gopkg.in/cenkalti/backoff.v2 v2.2.1/go.mod h1:S0QdOvT2AlerfSBkp0O+dk+bbIMaNbEmVk876gPCthU=
@@ -545,8 +534,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
534 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
535 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
536 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
548 -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=
549 -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
537 +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo=
538 +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
539 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
540 gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
541 gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -566,25 +555,25 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
555 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
556 gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
557 gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
569 -k8s.io/api v0.34.3 h1:D12sTP257/jSH2vHV2EDYrb16bS7ULlHpdNdNhEw2S4=
570 -k8s.io/api v0.34.3/go.mod h1:PyVQBF886Q5RSQZOim7DybQjAbVs8g7gwJNhGtY5MBk=
571 -k8s.io/apimachinery v0.34.3 h1:/TB+SFEiQvN9HPldtlWOTp0hWbJ+fjU+wkxysf/aQnE=
572 -k8s.io/apimachinery v0.34.3/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
573 -k8s.io/client-go v0.34.3 h1:wtYtpzy/OPNYf7WyNBTj3iUA0XaBHVqhv4Iv3tbrF5A=
574 -k8s.io/client-go v0.34.3/go.mod h1:OxxeYagaP9Kdf78UrKLa3YZixMCfP6bgPwPwNBQBzpM=
575 -k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
576 -k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
577 -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
578 -k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
579 -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
580 -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
558 +k8s.io/api v0.36.1 h1:XbL/EMj8K2aJpJtePmqUyQMsM0D4QI2pvl7YKJ20FTY=
559 +k8s.io/api v0.36.1/go.mod h1:KOWo4ey3TINlXjeHVuwB3i+tXXnu+UcwFBHlI/9dvEo=
560 +k8s.io/apimachinery v0.36.1 h1:G63Gjx2W+q0YD+72Vo8oY0nDnePVwnuzTmmy5ENrVSA=
561 +k8s.io/apimachinery v0.36.1/go.mod h1:ibYOR00vW/I1kzvi5SF0dRuJ52BvKtfvRdOn35GPQ+8=
562 +k8s.io/client-go v0.36.1 h1:FN/K8QIT2CEDt+2WB2HnWrUANZ50AP5GII43/SP2JR0=
563 +k8s.io/client-go v0.36.1/go.mod h1:s6rAnCtTGYDQnpNjEhSaISV+2O8jwruZ6m3QOYBFbtU=
564 +k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
565 +k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
566 +k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg=
567 +k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0=
568 +k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU=
569 +k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk=
570 layeh.com/radius v0.0.0-20190322222518-890bc1058917 h1:BDXFaFzUt5EIqe/4wrTc4AcYZWP6iC6Ult+jQWLh5eU=
571 layeh.com/radius v0.0.0-20190322222518-890bc1058917/go.mod h1:fywZKyu//X7iRzaxLgPWsvc0L26IUpVvE/aeIL2JtIQ=
583 -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
584 -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
572 +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
573 +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
574 sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
575 sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
587 -sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
588 -sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
576 +sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8=
577 +sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
578 sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
579 sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
src/go/plugin/go.d/collector/azure_monitor/collector_test.go
+15 -14
@@ -612,7 +612,7 @@ func TestCollector_UsesConfiguredTimeout(t *testing.T) {
612 }
613 mx.queryResponse = azmetrics.QueryResourcesResponse{MetricResults: azmetrics.MetricResults{Values: []azmetrics.MetricData{
614 {
615 - ResourceID: ptrString("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
615 + ResourceID: new("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
616 Values: []azmetrics.Metric{
617 metricWithAvg("cpu_percent", now, 21.5),
618 },
@@ -725,7 +725,7 @@ func TestCollector_RefreshDiscoveryDisabledWhenRefreshEveryZero(t *testing.T) {
725 mx := &mockMetricsClient{
726 queryResponse: azmetrics.QueryResourcesResponse{MetricResults: azmetrics.MetricResults{Values: []azmetrics.MetricData{
727 {
728 - ResourceID: ptrString("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
728 + ResourceID: new("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
729 Values: []azmetrics.Metric{
730 metricWithAvg("cpu_percent", now, 21.5),
731 },
@@ -766,7 +766,7 @@ func TestCollector_RefreshDiscoveryFailureFallsBackToLastKnownSnapshot(t *testin
766 mx := &mockMetricsClient{
767 queryResponse: azmetrics.QueryResourcesResponse{MetricResults: azmetrics.MetricResults{Values: []azmetrics.MetricData{
768 {
769 - ResourceID: ptrString("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
769 + ResourceID: new("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
770 Values: []azmetrics.Metric{
771 metricWithAvg("cpu_percent", now, 21.5),
772 },
@@ -825,14 +825,14 @@ func TestCollector_CollectScenarios(t *testing.T) {
825 }
826 mx.queryResponse = azmetrics.QueryResourcesResponse{MetricResults: azmetrics.MetricResults{Values: []azmetrics.MetricData{
827 {
828 - ResourceID: ptrString("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
828 + ResourceID: new("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
829 Values: []azmetrics.Metric{
830 metricWithAvg("cpu_percent", now, 21.5),
831 metricWithAvg("storage_percent", now, 61.2),
832 },
833 },
834 {
835 - ResourceID: ptrString("/subscriptions/sub-1/resourcegroups/rg-b/providers/microsoft.dbforpostgresql/flexibleservers/pg-b"),
835 + ResourceID: new("/subscriptions/sub-1/resourcegroups/rg-b/providers/microsoft.dbforpostgresql/flexibleservers/pg-b"),
836 Values: []azmetrics.Metric{
837 metricWithAvg("cpu_percent", now, 33.1),
838 metricWithAvg("storage_percent", now, 72.8),
@@ -870,13 +870,13 @@ func TestCollector_CollectScenarios(t *testing.T) {
870 }
871 mx.queryResponse = azmetrics.QueryResourcesResponse{MetricResults: azmetrics.MetricResults{Values: []azmetrics.MetricData{
872 {
873 - ResourceID: ptrString("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
873 + ResourceID: new("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
874 Values: []azmetrics.Metric{
875 metricWithAvg("cpu_percent", now, 21.5),
876 },
877 },
878 {
879 - ResourceID: ptrString("/subscriptions/sub-2/resourcegroups/rg-b/providers/microsoft.dbforpostgresql/flexibleservers/pg-b"),
879 + ResourceID: new("/subscriptions/sub-2/resourcegroups/rg-b/providers/microsoft.dbforpostgresql/flexibleservers/pg-b"),
880 Values: []azmetrics.Metric{
881 metricWithAvg("cpu_percent", now, 33.1),
882 },
@@ -932,7 +932,7 @@ func TestCollector_CollectScenarios(t *testing.T) {
932 mx.queryResponses = map[string]azmetrics.QueryResourcesResponse{
933 "sub-1": {MetricResults: azmetrics.MetricResults{Values: []azmetrics.MetricData{
934 {
935 - ResourceID: ptrString("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
935 + ResourceID: new("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.dbforpostgresql/flexibleservers/pg-a"),
936 Values: []azmetrics.Metric{
937 metricWithAvg("cpu_percent", now, 21.5),
938 },
@@ -1024,13 +1024,13 @@ func TestCollector_WorkloadMode_MixedTaggedAndUntaggedResources_RouteToCorrectSc
1024 mx := &mockMetricsClient{
1025 queryResponse: azmetrics.QueryResourcesResponse{MetricResults: azmetrics.MetricResults{Values: []azmetrics.MetricData{
1026 {
1027 - ResourceID: ptrString(strings.ToLower(taggedID)),
1027 + ResourceID: new(strings.ToLower(taggedID)),
1028 Values: []azmetrics.Metric{
1029 metricWithAvg("cpu_percent", now, 21.5),
1030 },
1031 },
1032 {
1033 - ResourceID: ptrString(strings.ToLower(untaggedID)),
1033 + ResourceID: new(strings.ToLower(untaggedID)),
1034 Values: []azmetrics.Metric{
1035 metricWithAvg("cpu_percent", now, 33.1),
1036 },
@@ -1167,7 +1167,7 @@ func TestCollector_TimeGrainScheduling(t *testing.T) {
1167 mx := &mockMetricsClient{
1168 queryResponse: azmetrics.QueryResourcesResponse{MetricResults: azmetrics.MetricResults{Values: []azmetrics.MetricData{
1169 {
1170 - ResourceID: ptrString("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.storage/storageaccounts/st-a"),
1170 + ResourceID: new("/subscriptions/sub-1/resourcegroups/rg-a/providers/microsoft.storage/storageaccounts/st-a"),
1171 Values: []azmetrics.Metric{
1172 metricWithAvg("UsedCapacity", now, 100),
1173 },
@@ -1356,7 +1356,7 @@ func TestSamplesFromQueryResponse_UsesResourceHostScope(t *testing.T) {
1356 resourceID := "/subscriptions/sub-1/resourceGroups/rg-a/providers/Microsoft.DBforPostgreSQL/flexibleServers/pg-a"
1357 samples := samplesFromQueryResponse(
1358 []azmetrics.MetricData{{
1359 - ResourceID: ptrString(strings.ToLower(resourceID)),
1359 + ResourceID: new(strings.ToLower(resourceID)),
1360 Values: []azmetrics.Metric{
1361 metricWithAvg("cpu_percent", now, 10),
1362 },
@@ -2872,14 +2872,15 @@ func (m *mockMetricsClient) queryCalls() []metricsQueryCall {
2872
2873 func metricWithAvg(name string, ts time.Time, value float64) azmetrics.Metric {
2874 return azmetrics.Metric{
2875 - Name: &azmetrics.LocalizableString{Value: ptrString(name)},
2875 + Name: &azmetrics.LocalizableString{Value: new(name)},
2876 TimeSeries: []azmetrics.TimeSeriesElement{
2877 {Data: []azmetrics.MetricValue{{TimeStamp: &ts, Average: &value}}},
2878 },
2879 }
2880 }
2881
2882 -func ptrString(v string) *string { return &v }
2882 +//go:fix inline
2883 +func ptrString(v string) *string { return new(v) }
2884
2885 func derefString(v *string) string {
2886 if v == nil {
src/go/plugin/go.d/collector/k8s_state/collector_test.go
+2 -2
@@ -517,7 +517,7 @@ func TestCollector_Collect(t *testing.T) {
517 create: func(t *testing.T) testCase {
518 cj := prepareCronJob("cronjob01")
519 cjSuspended := prepareCronJob("cronjob02")
520 - cjSuspended.Spec.Suspend = ptr(true)
520 + cjSuspended.Spec.Suspend = new(true)
521 jobNotStarted := prepareCronJobNotStartedJob("job-not-started", cj)
522 jobComplete := prepareCronJobCompleteJob("job-complete", cj)
523 jobFailed := prepareCronJobFailedJob("job-failed", cj)
@@ -1158,7 +1158,7 @@ func prepareCronJobJob(name string, cj *batchv1.CronJob) *batchv1.Job {
1158 CreationTimestamp: metav1.Time{Time: time.Now()},
1159 OwnerReferences: []metav1.OwnerReference{
1160 {
1161 - Controller: ptr(true),
1161 + Controller: new(true),
1162 Kind: "CronJob",
1163 UID: cj.UID,
1164 Name: cj.Name,
src/go/plugin/go.d/collector/k8s_state/discover_kubernetes.go
+10 -10
@@ -112,17 +112,17 @@ var (
112
113 func (d *kubeDiscovery) setupDiscoverers(ctx context.Context) []discoverer {
114 node := d.client.CoreV1().Nodes()
115 - nodeWatcher := &cache.ListWatch{
115 + nodeWatcher := cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
116 ListWithContextFunc: func(_ context.Context, options metav1.ListOptions) (runtime.Object, error) {
117 return node.List(ctx, options)
118 },
119 WatchFuncWithContext: func(_ context.Context, options metav1.ListOptions) (watch.Interface, error) {
120 return node.Watch(ctx, options)
121 },
122 - }
122 + }, d.client)
123
124 pod := d.client.CoreV1().Pods(corev1.NamespaceAll)
125 - podWatcher := &cache.ListWatch{
125 + podWatcher := cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
126 ListWithContextFunc: func(_ context.Context, options metav1.ListOptions) (runtime.Object, error) {
127 if myNodeName != "" {
128 options.FieldSelector = "spec.nodeName=" + myNodeName
@@ -135,37 +135,37 @@ func (d *kubeDiscovery) setupDiscoverers(ctx context.Context) []discoverer {
135 }
136 return pod.Watch(ctx, options)
137 },
138 - }
138 + }, d.client)
139
140 deploy := d.client.AppsV1().Deployments(corev1.NamespaceAll)
141 - deployWatcher := &cache.ListWatch{
141 + deployWatcher := cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
142 ListWithContextFunc: func(_ context.Context, options metav1.ListOptions) (runtime.Object, error) {
143 return deploy.List(ctx, options)
144 },
145 WatchFuncWithContext: func(_ context.Context, options metav1.ListOptions) (watch.Interface, error) {
146 return deploy.Watch(ctx, options)
147 },
148 - }
148 + }, d.client)
149
150 cj := d.client.BatchV1().CronJobs(corev1.NamespaceAll)
151 - cjWatcher := &cache.ListWatch{
151 + cjWatcher := cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
152 ListWithContextFunc: func(_ context.Context, options metav1.ListOptions) (runtime.Object, error) {
153 return cj.List(ctx, options)
154 },
155 WatchFuncWithContext: func(_ context.Context, options metav1.ListOptions) (watch.Interface, error) {
156 return cj.Watch(ctx, options)
157 },
158 - }
158 + }, d.client)
159
160 jobs := d.client.BatchV1().Jobs(corev1.NamespaceAll)
161 - jobsWatcher := &cache.ListWatch{
161 + jobsWatcher := cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
162 ListWithContextFunc: func(_ context.Context, options metav1.ListOptions) (runtime.Object, error) {
163 return jobs.List(ctx, options)
164 },
165 WatchFuncWithContext: func(_ context.Context, options metav1.ListOptions) (watch.Interface, error) {
166 return jobs.Watch(ctx, options)
167 },
168 - }
168 + }, d.client)
169
170 return []discoverer{
171 newNodeDiscoverer(cache.NewSharedInformer(nodeWatcher, &corev1.Node{}, resyncPeriod), d.Logger),
src/go/plugin/go.d/collector/k8s_state/update_cronjob_state.go
+2 -2
@@ -36,9 +36,9 @@ func (c *Collector) updateCronJobState(r resource) {
36 st.lastSuccessfulTime = nil
37
38 if cj.Status.LastScheduleTime != nil {
39 - st.lastScheduleTime = ptr(cj.Status.LastScheduleTime.Time)
39 + st.lastScheduleTime = new(cj.Status.LastScheduleTime.Time)
40 }
41 if cj.Status.LastSuccessfulTime != nil {
42 - st.lastSuccessfulTime = ptr(cj.Status.LastSuccessfulTime.Time)
42 + st.lastSuccessfulTime = new(cj.Status.LastSuccessfulTime.Time)
43 }
44 }
src/go/plugin/go.d/collector/k8s_state/update_job_state.go
+2 -2
@@ -48,10 +48,10 @@ func (c *Collector) updateJobState(r resource) {
48 }
49
50 if job.Status.StartTime != nil {
51 - st.startTime = ptr(job.Status.StartTime.Time)
51 + st.startTime = new(job.Status.StartTime.Time)
52 }
53 if job.Status.CompletionTime != nil {
54 - st.completionTime = ptr(job.Status.CompletionTime.Time)
54 + st.completionTime = new(job.Status.CompletionTime.Time)
55 }
56 st.active = job.Status.Active
57 st.conditions = job.Status.Conditions
src/go/plugin/go.d/collector/k8s_state/update_state.go
+2 -1
@@ -32,6 +32,7 @@ func copyLabels(dst, src map[string]string) {
32 maps.Copy(dst, src)
33 }
34
35 +//go:fix inline
36 func ptr[T any](v T) *T {
36 - return &v
37 + return new(v)
38 }
src/go/plugin/go.d/collector/postgres/collect.go
+2 -1
@@ -309,8 +309,9 @@ func parseFloat(s string) int64 {
309 return int64(v)
310 }
311
312 +//go:fix inline
313 func newInt(v int64) *int64 {
313 - return &v
314 + return new(v)
315 }
316
317 func calcPercentage(value, total int64) (v int64) {
src/go/plugin/go.d/collector/postgres/do_query_bloat.go
+8 -8
@@ -24,18 +24,18 @@ func (c *Collector) doDBQueryBloat(db *sql.DB) error {
24
25 for _, m := range c.mx.tables {
26 if m.bloatSize != nil {
27 - m.bloatSize = newInt(0)
27 + m.bloatSize = new(int64(0))
28 }
29 if m.bloatSizePerc != nil {
30 - m.bloatSizePerc = newInt(0)
30 + m.bloatSizePerc = new(int64(0))
31 }
32 }
33 for _, m := range c.mx.indexes {
34 if m.bloatSize != nil {
35 - m.bloatSize = newInt(0)
35 + m.bloatSize = new(int64(0))
36 }
37 if m.bloatSizePerc != nil {
38 - m.bloatSizePerc = newInt(0)
38 + m.bloatSizePerc = new(int64(0))
39 }
40 }
41
@@ -61,13 +61,13 @@ func (c *Collector) doDBQueryBloat(db *sql.DB) error {
61 }
62 if c.hasTableMetrics(table, dbname, schema) {
63 v := c.getTableMetrics(table, dbname, schema)
64 - v.bloatSize = newInt(tableWasted)
65 - v.bloatSizePerc = newInt(calcPercentage(tableWasted, v.totalSize))
64 + v.bloatSize = new(tableWasted)
65 + v.bloatSizePerc = new(calcPercentage(tableWasted, v.totalSize))
66 }
67 if iname != "?" && c.hasIndexMetrics(iname, table, dbname, schema) {
68 v := c.getIndexMetrics(iname, table, dbname, schema)
69 - v.bloatSize = newInt(idxWasted)
70 - v.bloatSizePerc = newInt(calcPercentage(idxWasted, v.size))
69 + v.bloatSize = new(idxWasted)
70 + v.bloatSizePerc = new(calcPercentage(idxWasted, v.size))
71 }
72 })
73 }
src/go/plugin/go.d/collector/postgres/do_query_columns.go
+2 -2
@@ -24,7 +24,7 @@ func (c *Collector) doDBQueryColumns(db *sql.DB) error {
24
25 for _, m := range c.mx.tables {
26 if m.nullColumns != nil {
27 - m.nullColumns = newInt(0)
27 + m.nullColumns = new(int64(0))
28 }
29 }
30
@@ -47,7 +47,7 @@ func (c *Collector) doDBQueryColumns(db *sql.DB) error {
47 if nullPerc == 100 && c.hasTableMetrics(table, dbname, schema) {
48 v := c.getTableMetrics(table, dbname, schema)
49 if v.nullColumns == nil {
50 - v.nullColumns = newInt(0)
50 + v.nullColumns = new(int64(0))
51 }
52 *v.nullColumns++
53 }
src/go/plugin/go.d/collector/postgres/do_query_databases.go
+1 -1
@@ -76,7 +76,7 @@ func (c *Collector) doQueryDatabaseSize() error {
76 case "datname":
77 db = value
78 case "size":
79 - c.getDBMetrics(db).size = newInt(parseInt(value))
79 + c.getDBMetrics(db).size = new(parseInt(value))
80 }
81 })
82 }
src/go/plugin/go.d/collector/sensors/collector_test.go
+94 -93
@@ -309,7 +309,8 @@ func (m *mockScanner) Scan() ([]*lmsensors.Chip, error) {
309 return m.scanData, nil
310 }
311
312 -func ptr[T any](v T) *T { return &v }
312 +//go:fix inline
313 +func ptr[T any](v T) *T { return new(v) }
314
315 func mockChips() []*lmsensors.Chip {
316 return []*lmsensors.Chip{
@@ -322,174 +323,174 @@ func mockChips() []*lmsensors.Chip {
323 {
324 Name: "in1",
325 Label: "some_label1",
325 - Alarm: ptr(false),
326 - Input: ptr(42.0),
327 - Average: ptr(42.0),
328 - Min: ptr(42.0),
329 - Max: ptr(42.0),
330 - CritMin: ptr(42.0),
331 - CritMax: ptr(42.0),
332 - Lowest: ptr(42.0),
333 - Highest: ptr(42.0),
326 + Alarm: new(false),
327 + Input: new(42.0),
328 + Average: new(42.0),
329 + Min: new(42.0),
330 + Max: new(42.0),
331 + CritMin: new(42.0),
332 + CritMax: new(42.0),
333 + Lowest: new(42.0),
334 + Highest: new(42.0),
335 },
336 {
337 Name: "in2",
338 Label: "some_label2",
338 - Input: ptr(42.0),
339 - Min: ptr(42.0),
340 - Max: ptr(42.0),
341 - CritMin: ptr(42.0),
342 - CritMax: ptr(42.0),
343 - Lowest: ptr(42.0),
344 - Highest: ptr(42.0),
339 + Input: new(42.0),
340 + Min: new(42.0),
341 + Max: new(42.0),
342 + CritMin: new(42.0),
343 + CritMax: new(42.0),
344 + Lowest: new(42.0),
345 + Highest: new(42.0),
346 },
347 },
348 Fan: []*lmsensors.FanSensor{
349 {
350 Name: "fan1",
351 Label: "some_label1",
351 - Alarm: ptr(false),
352 - Input: ptr(42.0),
353 - Min: ptr(42.0),
354 - Max: ptr(42.0),
355 - Target: ptr(42.0),
352 + Alarm: new(false),
353 + Input: new(42.0),
354 + Min: new(42.0),
355 + Max: new(42.0),
356 + Target: new(42.0),
357 },
358 {
359 Name: "fan2",
360 Label: "some_label2",
360 - Input: ptr(42.0),
361 - Min: ptr(42.0),
362 - Max: ptr(42.0),
363 - Target: ptr(42.0),
361 + Input: new(42.0),
362 + Min: new(42.0),
363 + Max: new(42.0),
364 + Target: new(42.0),
365 },
366 },
367 Temperature: []*lmsensors.TemperatureSensor{
368 {
369 Name: "temp1",
370 Label: "some_label1",
370 - Alarm: ptr(false),
371 + Alarm: new(false),
372 TempTypeRaw: 1,
372 - Input: ptr(42.0),
373 - Max: ptr(42.0),
374 - Min: ptr(42.0),
375 - CritMin: ptr(42.0),
376 - CritMax: ptr(42.0),
377 - Emergency: ptr(42.0),
378 - Lowest: ptr(42.0),
379 - Highest: ptr(42.0),
373 + Input: new(42.0),
374 + Max: new(42.0),
375 + Min: new(42.0),
376 + CritMin: new(42.0),
377 + CritMax: new(42.0),
378 + Emergency: new(42.0),
379 + Lowest: new(42.0),
380 + Highest: new(42.0),
381 },
382 {
383 Name: "temp2",
384 Label: "some_label2",
385 TempTypeRaw: 1,
385 - Input: ptr(42.0),
386 - Max: ptr(42.0),
387 - Min: ptr(42.0),
388 - CritMin: ptr(42.0),
389 - CritMax: ptr(42.0),
390 - Emergency: ptr(42.0),
391 - Lowest: ptr(42.0),
392 - Highest: ptr(42.0),
386 + Input: new(42.0),
387 + Max: new(42.0),
388 + Min: new(42.0),
389 + CritMin: new(42.0),
390 + CritMax: new(42.0),
391 + Emergency: new(42.0),
392 + Lowest: new(42.0),
393 + Highest: new(42.0),
394 },
395 },
396 Current: []*lmsensors.CurrentSensor{
397 {
398 Name: "curr1",
399 Label: "some_label1",
399 - Alarm: ptr(false),
400 - Max: ptr(42.0),
401 - Min: ptr(42.0),
402 - CritMin: ptr(42.0),
403 - CritMax: ptr(42.0),
404 - Input: ptr(42.0),
405 - Average: ptr(42.0),
406 - Lowest: ptr(42.0),
407 - Highest: ptr(42.0),
400 + Alarm: new(false),
401 + Max: new(42.0),
402 + Min: new(42.0),
403 + CritMin: new(42.0),
404 + CritMax: new(42.0),
405 + Input: new(42.0),
406 + Average: new(42.0),
407 + Lowest: new(42.0),
408 + Highest: new(42.0),
409 },
410 {
411 Name: "curr2",
412 Label: "some_label2",
412 - Max: ptr(42.0),
413 - Min: ptr(42.0),
414 - CritMin: ptr(42.0),
415 - CritMax: ptr(42.0),
416 - Input: ptr(42.0),
417 - Lowest: ptr(42.0),
418 - Highest: ptr(42.0),
413 + Max: new(42.0),
414 + Min: new(42.0),
415 + CritMin: new(42.0),
416 + CritMax: new(42.0),
417 + Input: new(42.0),
418 + Lowest: new(42.0),
419 + Highest: new(42.0),
420 },
421 },
422 Power: []*lmsensors.PowerSensor{
423 {
424 Name: "power1",
425 Label: "some_label1",
425 - Alarm: ptr(false),
426 - Average: ptr(345.0),
427 - AverageHighest: ptr(345.0),
428 - AverageLowest: ptr(345.0),
429 - AverageMax: ptr(345.0),
430 - AverageMin: ptr(345.0),
431 - Input: ptr(345.0),
432 - InputHighest: ptr(345.0),
433 - InputLowest: ptr(345.0),
434 - Accuracy: ptr(34.5),
435 - Cap: ptr(345.0),
436 - CapMax: ptr(345.0),
437 - CapMin: ptr(345.0),
438 - Max: ptr(345.0),
439 - CritMax: ptr(345.0),
426 + Alarm: new(false),
427 + Average: new(345.0),
428 + AverageHighest: new(345.0),
429 + AverageLowest: new(345.0),
430 + AverageMax: new(345.0),
431 + AverageMin: new(345.0),
432 + Input: new(345.0),
433 + InputHighest: new(345.0),
434 + InputLowest: new(345.0),
435 + Accuracy: new(34.5),
436 + Cap: new(345.0),
437 + CapMax: new(345.0),
438 + CapMin: new(345.0),
439 + Max: new(345.0),
440 + CritMax: new(345.0),
441 },
442 {
443 Name: "power2",
444 Label: "some_label2",
444 - AverageHighest: ptr(345.0),
445 - AverageLowest: ptr(345.0),
446 - AverageMax: ptr(345.0),
447 - AverageMin: ptr(345.0),
448 - Input: ptr(345.0),
449 - InputHighest: ptr(345.0),
450 - InputLowest: ptr(345.0),
451 - Accuracy: ptr(34.5),
452 - Cap: ptr(345.0),
453 - CapMax: ptr(345.0),
454 - CapMin: ptr(345.0),
455 - Max: ptr(345.0),
456 - CritMax: ptr(345.0),
445 + AverageHighest: new(345.0),
446 + AverageLowest: new(345.0),
447 + AverageMax: new(345.0),
448 + AverageMin: new(345.0),
449 + Input: new(345.0),
450 + InputHighest: new(345.0),
451 + InputLowest: new(345.0),
452 + Accuracy: new(34.5),
453 + Cap: new(345.0),
454 + CapMax: new(345.0),
455 + CapMin: new(345.0),
456 + Max: new(345.0),
457 + CritMax: new(345.0),
458 },
459 },
460 Energy: []*lmsensors.EnergySensor{
461 {
462 Name: "energy1",
463 Label: "some_label1",
463 - Input: ptr(42.0),
464 + Input: new(42.0),
465 },
466 {
467 Name: "energy2",
468 Label: "some_label2",
468 - Input: ptr(42.0),
469 + Input: new(42.0),
470 },
471 },
472 Humidity: []*lmsensors.HumiditySensor{
473 {
474 Name: "humidity1",
475 Label: "some_label1",
475 - Input: ptr(42.0),
476 + Input: new(42.0),
477 },
478 {
479 Name: "humidity2",
480 Label: "some_label2",
480 - Input: ptr(42.0),
481 + Input: new(42.0),
482 },
483 },
484 Intrusion: []*lmsensors.IntrusionSensor{
485 {
486 Name: "intrusion1",
487 Label: "some_label1",
487 - Alarm: ptr(false),
488 + Alarm: new(false),
489 },
490 {
491 Name: "intrusion2",
492 Label: "some_label2",
492 - Alarm: ptr(true),
493 + Alarm: new(true),
494 },
495 },
496 },
src/go/plugin/go.d/collector/sensors/lmsensors/parse.go
+9 -8
@@ -97,7 +97,7 @@ func parseVoltage(s *VoltageSensor, values map[string]rawValue) error {
97 case "label":
98 s.Label = v
99 case "alarm":
100 - s.Alarm = ptr(v != "0")
100 + s.Alarm = new(v != "0")
101 case "min":
102 s.Min, err = parseFloat(v, div)
103 case "lcrit":
@@ -142,7 +142,7 @@ func parseFan(s *FanSensor, values map[string]rawValue) error {
142 case "target":
143 s.Target, err = parseFloat(v, div)
144 case "alarm":
145 - s.Alarm = ptr(v != "0")
145 + s.Alarm = new(v != "0")
146 case "label":
147 s.Label = v
148 }
@@ -181,7 +181,7 @@ func parseTemperature(s *TemperatureSensor, values map[string]rawValue) error {
181 case "highest":
182 s.Highest, err = parseFloat(v, div)
183 case "alarm":
184 - s.Alarm = ptr(v != "0")
184 + s.Alarm = new(v != "0")
185 case "type":
186 t, err := strconv.Atoi(v)
187 if err != nil {
@@ -226,7 +226,7 @@ func parseCurrent(s *CurrentSensor, values map[string]rawValue) error {
226 case "highest":
227 s.Highest, err = parseFloat(v, div)
228 case "alarm":
229 - s.Alarm = ptr(v != "0")
229 + s.Alarm = new(v != "0")
230 case "label":
231 s.Label = v
232 }
@@ -251,7 +251,7 @@ func parsePower(s *PowerSensor, values map[string]rawValue) error {
251 case "label":
252 s.Label = v
253 case "alarm":
254 - s.Alarm = ptr(v != "0")
254 + s.Alarm = new(v != "0")
255 case "average":
256 s.Average, err = parseFloat(v, div)
257 case "average_highest":
@@ -345,7 +345,7 @@ func parseIntrusion(s *IntrusionSensor, values map[string]rawValue) error {
345 case "label":
346 s.Label = v
347 case "alarm":
348 - s.Alarm = ptr(v != "0")
348 + s.Alarm = new(v != "0")
349 }
350 }
351
@@ -358,7 +358,8 @@ func parseFloat(s string, div float64) (*float64, error) {
358 return nil, err
359 }
360
361 - return ptr(f / div), nil
361 + return new(f / div), nil
362 }
363
364 -func ptr[T any](v T) *T { return &v }
364 +//go:fix inline
365 +func ptr[T any](v T) *T { return new(v) }
src/go/plugin/go.d/collector/sensors/lmsensors/scanner_test.go
+49 -49
@@ -29,20 +29,20 @@ func TestScanner_Scan(t *testing.T) {
29 {
30 Name: "power1",
31 Label: "some_label",
32 - Alarm: ptr(false),
33 - Average: ptr(345.0),
34 - AverageHighest: ptr(345.0),
35 - AverageLowest: ptr(345.0),
36 - AverageMin: ptr(345.0),
37 - Input: ptr(345.0),
38 - InputHighest: ptr(345.0),
39 - InputLowest: ptr(345.0),
40 - Accuracy: ptr(34.5),
41 - Cap: ptr(345.0),
42 - CapMax: ptr(345.0),
43 - CapMin: ptr(345.0),
44 - Max: ptr(345.0),
45 - CritMax: ptr(345.0),
32 + Alarm: new(false),
33 + Average: new(345.0),
34 + AverageHighest: new(345.0),
35 + AverageLowest: new(345.0),
36 + AverageMin: new(345.0),
37 + Input: new(345.0),
38 + InputHighest: new(345.0),
39 + InputLowest: new(345.0),
40 + Accuracy: new(34.5),
41 + Cap: new(345.0),
42 + CapMax: new(345.0),
43 + CapMin: new(345.0),
44 + Max: new(345.0),
45 + CritMax: new(345.0),
46 },
47 },
48 }},
@@ -90,16 +90,16 @@ func TestScanner_Scan(t *testing.T) {
90 {
91 Name: "temp1",
92 Label: "some_label",
93 - Alarm: ptr(false),
93 + Alarm: new(false),
94 TempTypeRaw: 1,
95 - Input: ptr(42.0),
96 - Max: ptr(42.0),
97 - Min: ptr(42.0),
98 - CritMin: ptr(42.0),
99 - CritMax: ptr(42.0),
100 - Emergency: ptr(42.0),
101 - Lowest: ptr(42.0),
102 - Highest: ptr(42.0),
95 + Input: new(42.0),
96 + Max: new(42.0),
97 + Min: new(42.0),
98 + CritMin: new(42.0),
99 + CritMax: new(42.0),
100 + Emergency: new(42.0),
101 + Lowest: new(42.0),
102 + Highest: new(42.0),
103 },
104 },
105 }},
@@ -142,15 +142,15 @@ func TestScanner_Scan(t *testing.T) {
142 {
143 Name: "in1",
144 Label: "some_label",
145 - Alarm: ptr(false),
146 - Input: ptr(42.0),
147 - Average: ptr(42.0),
148 - Min: ptr(42.0),
149 - Max: ptr(42.0),
150 - CritMin: ptr(42.0),
151 - CritMax: ptr(42.0),
152 - Lowest: ptr(42.0),
153 - Highest: ptr(42.0),
145 + Alarm: new(false),
146 + Input: new(42.0),
147 + Average: new(42.0),
148 + Min: new(42.0),
149 + Max: new(42.0),
150 + CritMin: new(42.0),
151 + CritMax: new(42.0),
152 + Lowest: new(42.0),
153 + Highest: new(42.0),
154 },
155 },
156 }},
@@ -192,11 +192,11 @@ func TestScanner_Scan(t *testing.T) {
192 {
193 Name: "fan1",
194 Label: "some_label",
195 - Alarm: ptr(false),
196 - Input: ptr(42.0),
197 - Min: ptr(42.0),
198 - Max: ptr(42.0),
199 - Target: ptr(42.0),
195 + Alarm: new(false),
196 + Input: new(42.0),
197 + Min: new(42.0),
198 + Max: new(42.0),
199 + Target: new(42.0),
200 },
201 },
202 }},
@@ -234,7 +234,7 @@ func TestScanner_Scan(t *testing.T) {
234 {
235 Name: "energy1",
236 Label: "some_label",
237 - Input: ptr(42.0),
237 + Input: new(42.0),
238 },
239 },
240 }},
@@ -269,15 +269,15 @@ func TestScanner_Scan(t *testing.T) {
269 {
270 Name: "curr1",
271 Label: "some_label",
272 - Alarm: ptr(false),
273 - Max: ptr(42.0),
274 - Min: ptr(42.0),
275 - CritMin: ptr(42.0),
276 - CritMax: ptr(42.0),
277 - Input: ptr(42.0),
278 - Average: ptr(42.0),
279 - Lowest: ptr(42.0),
280 - Highest: ptr(42.0),
272 + Alarm: new(false),
273 + Max: new(42.0),
274 + Min: new(42.0),
275 + CritMin: new(42.0),
276 + CritMax: new(42.0),
277 + Input: new(42.0),
278 + Average: new(42.0),
279 + Lowest: new(42.0),
280 + Highest: new(42.0),
281 },
282 },
283 }},
@@ -319,7 +319,7 @@ func TestScanner_Scan(t *testing.T) {
319 {
320 Name: "humidity1",
321 Label: "some_label",
322 - Input: ptr(42.0),
322 + Input: new(42.0),
323 },
324 },
325 }},
@@ -354,7 +354,7 @@ func TestScanner_Scan(t *testing.T) {
354 {
355 Name: "intrusion1",
356 Label: "some_label",
357 - Alarm: ptr(false),
357 + Alarm: new(false),
358 },
359 },
360 }},
src/go/plugin/go.d/collector/snmp/bgp_integration.go
+2 -6
@@ -5,6 +5,7 @@ package snmp
5 import (
6 "errors"
7 "fmt"
8 + "slices"
9 "time"
10
11 "github.com/netdata/netdata/go/plugins/pkg/funcapi"
@@ -173,12 +174,7 @@ func collectorSpecificMethodConfigs() []funcapi.MethodConfig {
174 }
175
176 func profilesHaveBGP(profiles []*ddsnmp.Profile) bool {
176 - for _, prof := range profiles {
177 - if profileHasBGP(prof) {
178 - return true
179 - }
180 - }
181 - return false
177 + return slices.ContainsFunc(profiles, profileHasBGP)
178 }
179
180 func profileHasBGP(prof *ddsnmp.Profile) bool {
src/go/plugin/go.d/collector/snmp/bgp_typed_metrics.go
+1 -3
@@ -280,9 +280,7 @@ func (b *bgpTypedMetricBuilder) metricsWithDeviceSummaries() []ddsnmp.Metric {
280 if peerCounts == nil && len(b.explicitDevicePeerCounts) > 0 {
281 peerCounts = make(map[string]int64, len(b.explicitDevicePeerCounts))
282 }
283 - for dim, value := range b.explicitDevicePeerCounts {
284 - peerCounts[dim] = value
285 - }
283 + maps.Copy(peerCounts, b.explicitDevicePeerCounts)
284 b.addMetric(b.deviceSample, "bgp.devices.peer_counts", peerCounts, nil)
285 b.addMetric(b.deviceSample, "bgp.devices.peer_states", b.devicePeerStates, nil)
286 }
src/go/plugin/go.d/collector/snmp/metric_ids.go
+8 -6
@@ -33,19 +33,21 @@ func metricIDFromKey(key string, subkeys ...string) string {
33 }
34
35 func rawMetricID(prefix, base string, subkeys ...string) string {
36 - id := prefix + base
36 + var id strings.Builder
37 + id.WriteString(prefix + base)
38 for _, subkey := range subkeys {
38 - id += "_" + subkey
39 + id.WriteString("_" + subkey)
40 }
40 - return id
41 + return id.String()
42 }
43
44 func cleanedMetricID(prefix, base string, subkeys ...string) string {
44 - id := prefix + cleanMetricName.Replace(base)
45 + var id strings.Builder
46 + id.WriteString(prefix + cleanMetricName.Replace(base))
47 for _, subkey := range subkeys {
46 - id += "_" + cleanMetricName.Replace(subkey)
48 + id.WriteString("_" + cleanMetricName.Replace(subkey))
49 }
48 - return id
50 + return id.String()
51 }
52
53 func chartContextID(name string) string {
src/go/plugin/go.d/collector/unbound/collect.go
+1 -1
@@ -138,7 +138,7 @@ func (c *Collector) processStats(stats []entry, mul float64) map[string]int64 {
138 return mx
139 }
140
141 -func extractThread(key string) string { idx := strings.IndexByte(key, '.'); return key[:idx] }
141 +func extractThread(key string) string { before, _, _ := strings.Cut(key, "."); return before }
142 func extractQueryType(key string) string { i := len("num.query.type."); return key[i:] }
143 func extractQueryClass(key string) string { i := len("num.query.class."); return key[i:] }
144 func extractQueryOpCode(key string) string { i := len("num.query.opcode."); return key[i:] }
src/go/plugin/go.d/discovery/sdext/discoverer/k8ssd/kubernetes.go
+8 -8
@@ -170,7 +170,7 @@ func (d *KubeDiscoverer) Discover(ctx context.Context, in chan<- []model.TargetG
170
171 func (d *KubeDiscoverer) setupPodDiscoverer(ctx context.Context, ns string) *podDiscoverer {
172 pod := d.client.CoreV1().Pods(ns)
173 - podLW := &cache.ListWatch{
173 + podLW := cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
174 ListWithContextFunc: func(_ context.Context, opts metav1.ListOptions) (runtime.Object, error) {
175 opts.FieldSelector = d.selectorField
176 opts.LabelSelector = d.selectorLabel
@@ -181,27 +181,27 @@ func (d *KubeDiscoverer) setupPodDiscoverer(ctx context.Context, ns string) *pod
181 opts.LabelSelector = d.selectorLabel
182 return pod.Watch(ctx, opts)
183 },
184 - }
184 + }, d.client)
185
186 cmap := d.client.CoreV1().ConfigMaps(ns)
187 - cmapLW := &cache.ListWatch{
187 + cmapLW := cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
188 ListWithContextFunc: func(_ context.Context, opts metav1.ListOptions) (runtime.Object, error) {
189 return cmap.List(ctx, opts)
190 },
191 WatchFuncWithContext: func(_ context.Context, opts metav1.ListOptions) (watch.Interface, error) {
192 return cmap.Watch(ctx, opts)
193 },
194 - }
194 + }, d.client)
195
196 secret := d.client.CoreV1().Secrets(ns)
197 - secretLW := &cache.ListWatch{
197 + secretLW := cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
198 ListWithContextFunc: func(_ context.Context, opts metav1.ListOptions) (runtime.Object, error) {
199 return secret.List(ctx, opts)
200 },
201 WatchFuncWithContext: func(_ context.Context, opts metav1.ListOptions) (watch.Interface, error) {
202 return secret.Watch(ctx, opts)
203 },
204 - }
204 + }, d.client)
205
206 td := newPodDiscoverer(
207 cache.NewSharedInformer(podLW, &corev1.Pod{}, resyncPeriod),
@@ -215,7 +215,7 @@ func (d *KubeDiscoverer) setupPodDiscoverer(ctx context.Context, ns string) *pod
215 func (d *KubeDiscoverer) setupServiceDiscoverer(ctx context.Context, namespace string) *serviceDiscoverer {
216 svc := d.client.CoreV1().Services(namespace)
217
218 - svcLW := &cache.ListWatch{
218 + svcLW := cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
219 ListWithContextFunc: func(_ context.Context, opts metav1.ListOptions) (runtime.Object, error) {
220 opts.FieldSelector = d.selectorField
221 opts.LabelSelector = d.selectorLabel
@@ -226,7 +226,7 @@ func (d *KubeDiscoverer) setupServiceDiscoverer(ctx context.Context, namespace s
226 opts.LabelSelector = d.selectorLabel
227 return svc.Watch(ctx, opts)
228 },
229 - }
229 + }, d.client)
230
231 inf := cache.NewSharedInformer(svcLW, &corev1.Service{}, resyncPeriod)
232
src/go/plugin/ibm.d/docgen/config_parser.go
+8 -8
@@ -441,28 +441,28 @@ func setFieldDefaults(field *ConfigField) {
441 switch field.Name {
442 case "UpdateEvery":
443 field.Default = 1
444 - field.Minimum = intPtr(1)
444 + field.Minimum = new(1)
445 case "ConnectTimeout":
446 field.Default = 5
447 - field.Minimum = intPtr(1)
448 - field.Maximum = intPtr(300)
447 + field.Minimum = new(1)
448 + field.Maximum = new(300)
449 case "CollectItems":
450 field.Default = true
451 case "MaxItems":
452 field.Default = 10
453 - field.Minimum = intPtr(1)
454 - field.Maximum = intPtr(1000)
453 + field.Minimum = new(1)
454 + field.Maximum = new(1000)
455 case "Endpoint":
456 field.Default = "dummy://localhost"
457 field.Examples = []string{"dummy://localhost", "tcp://server:1414"}
458 case "ObsoletionIterations":
459 field.Default = 60
460 - field.Minimum = intPtr(1)
460 + field.Minimum = new(1)
461
462 // Generic defaults for common field patterns
463 case "Port":
464 - field.Minimum = intPtr(1)
465 - field.Maximum = intPtr(65535)
464 + field.Minimum = new(1)
465 + field.Maximum = new(65535)
466 }
467
468 // Set format hints for specific field types
src/go/plugin/ibm.d/docgen/main.go
+8 -7
@@ -251,7 +251,7 @@ func (g *DocGenerator) parseConfig() ([]ConfigField, error) {
251 }}, fields...)
252 }
253
254 - ensureField("update_every", "Data collection frequency", "UpdateEvery", 10, "integer", "Connection", "", intPtr(1), nil)
254 + ensureField("update_every", "Data collection frequency", "UpdateEvery", 10, "integer", "Connection", "", new(1), nil)
255
256 if g.hasHTTPConfig {
257 ensureField("url", "Target URL", "", "", "string", "Connection", "", nil, nil)
@@ -282,7 +282,7 @@ func (g *DocGenerator) getFallbackConfigFields() []ConfigField {
282 Required: false,
283 Default: 10,
284 Description: "Data collection frequency",
285 - Minimum: intPtr(1),
285 + Minimum: new(1),
286 },
287 {
288 Name: "reset_statistics",
@@ -311,8 +311,8 @@ func (g *DocGenerator) getFallbackConfigFields() []ConfigField {
311 Required: false,
312 Default: 5,
313 Description: "Connection timeout in seconds",
314 - Minimum: intPtr(1),
315 - Maximum: intPtr(300),
314 + Minimum: new(1),
315 + Maximum: new(300),
316 },
317 {
318 Name: "collect_items",
@@ -331,14 +331,15 @@ func (g *DocGenerator) getFallbackConfigFields() []ConfigField {
331 Required: false,
332 Default: 10,
333 Description: "Maximum number of items to collect",
334 - Minimum: intPtr(1),
335 - Maximum: intPtr(1000),
334 + Minimum: new(1),
335 + Maximum: new(1000),
336 },
337 }
338 }
339
340 +//go:fix inline
341 func intPtr(i int) *int {
341 - return &i
342 + return new(i)
343 }
344
345 func indent(spaces int, text string) string {
src/go/plugin/ibm.d/modules/as400/batch_path.go
+3 -6
@@ -8,6 +8,7 @@ import (
8 "context"
9 "errors"
10 "fmt"
11 + "maps"
12 "sync"
13 "time"
14
@@ -327,15 +328,11 @@ func cloneQueueTotalsSnapshot(src queueTotalsSnapshot) queueTotalsSnapshot {
328 }
329 if src.queues != nil {
330 dst.queues = make(map[string]int64, len(src.queues))
330 - for k, v := range src.queues {
331 - dst.queues[k] = v
332 - }
331 + maps.Copy(dst.queues, src.queues)
332 }
333 if src.items != nil {
334 dst.items = make(map[string]int64, len(src.items))
336 - for k, v := range src.items {
337 - dst.items[k] = v
338 - }
335 + maps.Copy(dst.items, src.items)
336 }
337 return dst
338 }
src/go/plugin/ibm.d/modules/as400/collect_data.go
+6 -11
@@ -7,6 +7,7 @@ package as400
7 import (
8 "context"
9 "fmt"
10 + "maps"
11 "math"
12 "strconv"
13 "strings"
@@ -933,11 +934,9 @@ func (a *Collector) collectDiskInstances(ctx context.Context) error {
934 // Calculate used_gb from capacity - available
935 // Always calculate used_gb if we have capacity information
936 if m.CapacityGB > 0 {
936 - usedGB := m.CapacityGB - m.AvailableGB
937 - // Ensure used_gb is not negative
938 - if usedGB < 0 {
939 - usedGB = 0
940 - }
937 + usedGB := max(
938 + // Ensure used_gb is not negative
939 + m.CapacityGB-m.AvailableGB, 0)
940 m.UsedGB = usedGB
941 a.mx.disks[currentUnit] = m
942 }
@@ -1090,9 +1089,7 @@ func (a *Collector) collectSubsystems(ctx context.Context) error {
1089 *ptr = meta
1090 a.subsystems[key] = ptr
1091 }
1093 - for key, metrics := range snapshot.metrics {
1094 - a.mx.subsystems[key] = metrics
1095 - }
1092 + maps.Copy(a.mx.subsystems, snapshot.metrics)
1093 return snapshot.err
1094 }
1095
@@ -1664,9 +1661,7 @@ func (a *Collector) collectPlanCache(ctx context.Context) error {
1661 a.planCache[key] = ptr
1662 }
1663 }
1667 - for key, values := range snapshot.values {
1668 - a.mx.planCache[key] = values
1669 - }
1664 + maps.Copy(a.mx.planCache, snapshot.values)
1665 return snapshot.err
1666 }
1667
src/go/plugin/ibm.d/modules/as400/collector.go
+1 -4
@@ -1068,10 +1068,7 @@ func (c *Collector) slowPathIntervalSeconds() int {
1068 }
1069 interval := int(c.slow.config.interval / time.Second)
1070 if interval < 1 {
1071 - interval = c.fastPathIntervalSeconds()
1072 - if interval < 1 {
1073 - interval = 1
1074 - }
1071 + interval = max(c.fastPathIntervalSeconds(), 1)
1072 }
1073 return interval
1074 }
src/go/plugin/ibm.d/modules/as400/dump.go
+2 -3
@@ -7,6 +7,7 @@ package as400
7 import (
8 "encoding/json"
9 "fmt"
10 + "maps"
11 "os"
12 "path/filepath"
13 "sync"
@@ -112,9 +113,7 @@ func (d *dumpContext) recordMetrics(metrics map[string]int64) {
113 d.metricSeq++
114 filename := fmt.Sprintf("metrics-%04d.json", d.metricSeq)
115 copyMetrics := make(map[string]int64, len(metrics))
115 - for k, v := range metrics {
116 - copyMetrics[k] = v
117 - }
116 + maps.Copy(copyMetrics, metrics)
117 payload := struct {
118 GeneratedAt time.Time `json:"generated_at"`
119 Metrics map[string]int64 `json:"metrics"`
src/go/plugin/ibm.d/modules/as400/helpers.go
+2 -2
@@ -25,7 +25,7 @@ func cleanName(name string) string {
25 return strings.ToLower(r.Replace(name))
26 }
27
28 -func (c *Collector) logOnce(key string, format string, args ...interface{}) {
28 +func (c *Collector) logOnce(key string, format string, args ...any) {
29 if c.disabled[key] {
30 return
31 }
@@ -33,7 +33,7 @@ func (c *Collector) logOnce(key string, format string, args ...interface{}) {
33 c.disabled[key] = true
34 }
35
36 -func (c *Collector) logErrorOnce(key string, format string, args ...interface{}) {
36 +func (c *Collector) logErrorOnce(key string, format string, args ...any) {
37 c.muErrorLog.Lock()
38 defer c.muErrorLog.Unlock()
39
src/go/plugin/ibm.d/modules/as400/slow_path.go
+11 -30
@@ -6,6 +6,7 @@ import (
6 "context"
7 "errors"
8 "fmt"
9 + "maps"
10 "strings"
11 "sync"
12 "time"
@@ -149,15 +150,11 @@ func cloneMessageQueueSnapshot(src messageQueueSnapshot) messageQueueSnapshot {
150 }
151 if src.metrics != nil {
152 dst.metrics = make(map[string]messageQueueInstanceMetrics, len(src.metrics))
152 - for k, v := range src.metrics {
153 - dst.metrics[k] = v
154 - }
153 + maps.Copy(dst.metrics, src.metrics)
154 }
155 if src.meta != nil {
156 dst.meta = make(map[string]messageQueueMetrics, len(src.meta))
158 - for k, v := range src.meta {
159 - dst.meta[k] = v
160 - }
157 + maps.Copy(dst.meta, src.meta)
158 }
159 return dst
160 }
@@ -169,15 +166,11 @@ func cloneJobQueueSnapshot(src jobQueueSnapshot) jobQueueSnapshot {
166 }
167 if src.metrics != nil {
168 dst.metrics = make(map[string]jobQueueInstanceMetrics, len(src.metrics))
172 - for k, v := range src.metrics {
173 - dst.metrics[k] = v
174 - }
169 + maps.Copy(dst.metrics, src.metrics)
170 }
171 if src.meta != nil {
172 dst.meta = make(map[string]jobQueueMetrics, len(src.meta))
178 - for k, v := range src.meta {
179 - dst.meta[k] = v
180 - }
173 + maps.Copy(dst.meta, src.meta)
174 }
175 return dst
176 }
@@ -189,15 +182,11 @@ func cloneOutputQueueSnapshot(src outputQueueSnapshot) outputQueueSnapshot {
182 }
183 if src.metrics != nil {
184 dst.metrics = make(map[string]outputQueueInstanceMetrics, len(src.metrics))
192 - for k, v := range src.metrics {
193 - dst.metrics[k] = v
194 - }
185 + maps.Copy(dst.metrics, src.metrics)
186 }
187 if src.meta != nil {
188 dst.meta = make(map[string]outputQueueMetrics, len(src.meta))
198 - for k, v := range src.meta {
199 - dst.meta[k] = v
200 - }
189 + maps.Copy(dst.meta, src.meta)
190 }
191 return dst
192 }
@@ -209,15 +198,11 @@ func cloneSubsystemSnapshot(src subsystemSnapshot) subsystemSnapshot {
198 }
199 if src.metrics != nil {
200 dst.metrics = make(map[string]subsystemInstanceMetrics, len(src.metrics))
212 - for k, v := range src.metrics {
213 - dst.metrics[k] = v
214 - }
201 + maps.Copy(dst.metrics, src.metrics)
202 }
203 if src.meta != nil {
204 dst.meta = make(map[string]subsystemMetrics, len(src.meta))
218 - for k, v := range src.meta {
219 - dst.meta[k] = v
220 - }
205 + maps.Copy(dst.meta, src.meta)
206 }
207 return dst
208 }
@@ -229,15 +214,11 @@ func clonePlanCacheSnapshot(src planCacheSnapshot) planCacheSnapshot {
214 }
215 if src.values != nil {
216 dst.values = make(map[string]planCacheInstanceMetrics, len(src.values))
232 - for k, v := range src.values {
233 - dst.values[k] = v
234 - }
217 + maps.Copy(dst.values, src.values)
218 }
219 if src.meta != nil {
220 dst.meta = make(map[string]planCacheMetrics, len(src.meta))
238 - for k, v := range src.meta {
239 - dst.meta[k] = v
240 - }
221 + maps.Copy(dst.meta, src.meta)
222 }
223 return dst
224 }
src/go/plugin/ibm.d/modules/db2/collect.go
+3 -8
@@ -8,6 +8,7 @@ import (
8 "context"
9 "database/sql"
10 "fmt"
11 + "slices"
12 "strconv"
13 "strings"
14 "time"
@@ -582,7 +583,7 @@ func (c *Collector) readRows(rows *sql.Rows, assign func(column, value string, l
583 }
584
585 values := make([]sql.NullString, len(columns))
585 - valuePtrs := make([]interface{}, len(columns))
586 + valuePtrs := make([]any, len(columns))
587 for i := range values {
588 valuePtrs[i] = &values[i]
589 }
@@ -1668,13 +1669,7 @@ func (c *Collector) collectFederationMetrics(ctx context.Context) error {
1669 // contains is a helper function to check if all target strings are present in the slice
1670 func contains(slice []string, targets ...string) bool {
1671 for _, target := range targets {
1671 - found := false
1672 - for _, s := range slice {
1673 - if s == target {
1674 - found = true
1675 - break
1676 - }
1677 - }
1672 + found := slices.Contains(slice, target)
1673 if !found {
1674 return false
1675 }
src/go/plugin/ibm.d/modules/db2/collector.go
+1 -1
@@ -114,7 +114,7 @@ func compileMatcher(patterns []string) (matcher.Matcher, error) {
114 return matcher.NewSimplePatternsMatcher(expr)
115 }
116
117 -func (c *Collector) warnOnce(key string, format string, args ...interface{}) {
117 +func (c *Collector) warnOnce(key string, format string, args ...any) {
118 c.warnMu.Lock()
119 defer c.warnMu.Unlock()
120
src/go/plugin/ibm.d/modules/db2/helpers.go
+1 -1
@@ -59,7 +59,7 @@ func safeDSN(dsn string) string {
59 return masked
60 }
61
62 -func (c *Collector) logOnce(key string, format string, args ...interface{}) {
62 +func (c *Collector) logOnce(key string, format string, args ...any) {
63 if c.disabledMetrics[key] || c.disabledFeatures[key] {
64 return
65 }
src/go/plugin/scripts.d/collector/nagios/internal/output/parser_test.go
+8 -7
@@ -34,12 +34,12 @@ func TestParseRangeVariants(t *testing.T) {
34 high *float64
35 inclusive bool
36 }{
37 - "simple": {input: "10", low: floatPtr(0), high: floatPtr(10)},
38 - "range": {input: "10:20", low: floatPtr(10), high: floatPtr(20)},
39 - "inclusive": {input: "@5:15", low: floatPtr(5), high: floatPtr(15), inclusive: true},
40 - "lower_unbounded": {input: "~:5", low: nil, high: floatPtr(5)},
41 - "upper_unbounded": {input: "10:", low: floatPtr(10), high: nil},
42 - "default_low": {input: ":30", low: floatPtr(0), high: floatPtr(30)},
37 + "simple": {input: "10", low: new(float64(0)), high: new(float64(10))},
38 + "range": {input: "10:20", low: new(float64(10)), high: new(float64(20))},
39 + "inclusive": {input: "@5:15", low: new(float64(5)), high: new(float64(15)), inclusive: true},
40 + "lower_unbounded": {input: "~:5", low: nil, high: new(float64(5))},
41 + "upper_unbounded": {input: "10:", low: new(float64(10)), high: nil},
42 + "default_low": {input: ":30", low: new(float64(0)), high: new(float64(30))},
43 "unknown": {input: "U", expectNil: true},
44 }
45 for name, tc := range tests {
@@ -67,8 +67,9 @@ func TestParseRangeVariants(t *testing.T) {
67 }
68 }
69
70 +//go:fix inline
71 func floatPtr(v float64) *float64 {
71 - return &v
72 + return new(v)
73 }
74
75 func TestParseLongOutputPreservesLeadingWhitespace(t *testing.T) {
src/go/tools/topology-ip-intel-downloader/fetch.go
+1 -1
@@ -180,7 +180,7 @@ func (d *downloader) resolveCAIDAPrefix2ASURL(logURL string) (string, error) {
180 }
181
182 candidates := make([]caidaCandidate, 0)
183 - for _, line := range strings.Split(string(page), "\n") {
183 + for line := range strings.SplitSeq(string(page), "\n") {
184 fields := strings.Fields(strings.TrimSpace(line))
185 if len(fields) == 0 {
186 continue
src/go/tools/topology-ip-intel-downloader/fetch_test.go
+1 -1
@@ -205,5 +205,5 @@ func clearTarMagicAndRecomputeChecksum(t *testing.T, header []byte) {
205 for _, b := range header {
206 sum += int(b)
207 }
208 - copy(header[148:156], []byte(fmt.Sprintf("%06o\x00 ", sum)))
208 + copy(header[148:156], fmt.Appendf(nil, "%06o\x00 ", sum))
209 }