Skip to content

Commit 66a68a2

Browse files
authored
Merge pull request #917 from judehung/update-go-1.25
build: update to go 1.25 and golangci-lint 2.5.0
2 parents 49a58b3 + c19c369 commit 66a68a2

File tree

6 files changed

+213
-170
lines changed

6 files changed

+213
-170
lines changed

.golangci.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1+
version: "2"
12
linters:
2-
disable:
33
enable:
44
- gosec
5-
linters-settings:
6-
gosec:
7-
excludes:
8-
# G115: integer overflow conversion
9-
# exclude the rule since it tends to be false positive
10-
- G115
5+
exclusions:
6+
generated: lax
7+
presets:
8+
- comments
9+
- common-false-positives
10+
- legacy
11+
- std-error-handling
12+
paths:
13+
- third_party$
14+
- builtin$
15+
- examples$
16+
formatters:
17+
exclusions:
18+
generated: lax
19+
paths:
20+
- third_party$
21+
- builtin$
22+
- examples$

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717

1818
edgeXBuildGoMod (
1919
project: 'go-mod-bootstrap',
20-
goVersion: '1.23'
20+
goVersion: '1.25'
2121
)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ lint:
1414
@if [ "z${ARCH}" = "zx86_64" ] && which golangci-lint >/dev/null ; then golangci-lint run --config .golangci.yml ; else echo "WARNING: Linting skipped (not on x86_64 or linter not installed)"; fi
1515

1616
install-lint:
17-
sudo curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.61.0
17+
sudo curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v2.5.0
1818

1919
test: unittest lint
2020
$(GO) vet ./...

bootstrap/environment/variables.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,27 +308,27 @@ func (*Variables) convertToType(oldValue any, value string) (newValue any, err e
308308
newValue = int(newValue.(int64))
309309
case int8:
310310
newValue, err = strconv.ParseInt(value, 10, 8)
311-
newValue = int8(newValue.(int64))
311+
newValue = int8(newValue.(int64)) // #nosec G115 -- specify bitSize above, so conversion here is safe
312312
case int16:
313313
newValue, err = strconv.ParseInt(value, 10, 16)
314-
newValue = int16(newValue.(int64))
314+
newValue = int16(newValue.(int64)) // #nosec G115 -- specify bitSize above, so conversion here is safe
315315
case int32:
316316
newValue, err = strconv.ParseInt(value, 10, 32)
317-
newValue = int32(newValue.(int64))
317+
newValue = int32(newValue.(int64)) // #nosec G115 -- specify bitSize above, so conversion here is safe
318318
case int64:
319319
newValue, err = strconv.ParseInt(value, 10, 64)
320320
case uint:
321321
newValue, err = strconv.ParseUint(value, 10, strconv.IntSize)
322322
newValue = uint(newValue.(uint64))
323323
case uint8:
324324
newValue, err = strconv.ParseUint(value, 10, 8)
325-
newValue = uint8(newValue.(uint64))
325+
newValue = uint8(newValue.(uint64)) // #nosec G115 -- specify bitSize above, so conversion here is safe
326326
case uint16:
327327
newValue, err = strconv.ParseUint(value, 10, 16)
328-
newValue = uint16(newValue.(uint64))
328+
newValue = uint16(newValue.(uint64)) // #nosec G115 -- specify bitSize above, so conversion here is safe
329329
case uint32:
330330
newValue, err = strconv.ParseUint(value, 10, 32)
331-
newValue = uint32(newValue.(uint64))
331+
newValue = uint32(newValue.(uint64)) // #nosec G115 -- specify bitSize above, so conversion here is safe
332332
case uint64:
333333
newValue, err = strconv.ParseUint(value, 10, 64)
334334
case float32:

go.mod

Lines changed: 58 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
module github.com/edgexfoundry/go-mod-bootstrap/v4
22

3-
go 1.23.7
3+
go 1.25.0
44

55
require (
6-
github.com/eclipse/paho.mqtt.golang v1.5.0
7-
github.com/edgexfoundry/go-mod-configuration/v4 v4.1.0-dev.16
8-
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.1.0-dev.18
9-
github.com/edgexfoundry/go-mod-messaging/v4 v4.1.0-dev.17
10-
github.com/edgexfoundry/go-mod-registry/v4 v4.1.0-dev.5
11-
github.com/edgexfoundry/go-mod-secrets/v4 v4.1.0-dev.6
6+
github.com/eclipse/paho.mqtt.golang v1.5.1
7+
github.com/edgexfoundry/go-mod-configuration/v4 v4.1.0-dev.17
8+
github.com/edgexfoundry/go-mod-core-contracts/v4 v4.1.0-dev.21
9+
github.com/edgexfoundry/go-mod-messaging/v4 v4.1.0-dev.18
10+
github.com/edgexfoundry/go-mod-registry/v4 v4.1.0-dev.7
11+
github.com/edgexfoundry/go-mod-secrets/v4 v4.1.0-dev.7
1212
github.com/golang-jwt/jwt/v5 v5.3.0
1313
github.com/google/uuid v1.6.0
1414
github.com/hashicorp/go-multierror v1.1.1
1515
github.com/labstack/echo/v4 v4.13.4
1616
github.com/mitchellh/copystructure v1.2.0
1717
github.com/mitchellh/mapstructure v1.5.0
18-
github.com/openziti/sdk-golang v1.2.3
18+
github.com/openziti/sdk-golang v1.2.10
1919
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9
2020
github.com/sirupsen/logrus v1.9.3
2121
github.com/stretchr/testify v1.11.1
@@ -31,38 +31,48 @@ require (
3131
github.com/fsnotify/fsnotify v1.9.0 // indirect
3232
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa // indirect
3333
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
34-
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
35-
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
34+
github.com/gabriel-vasile/mimetype v1.4.11 // indirect
35+
github.com/go-jose/go-jose/v4 v4.1.2 // indirect
3636
github.com/go-kit/log v0.2.1 // indirect
3737
github.com/go-logfmt/logfmt v0.5.1 // indirect
3838
github.com/go-logr/logr v1.4.3 // indirect
3939
github.com/go-logr/stdr v1.2.2 // indirect
4040
github.com/go-ole/go-ole v1.2.6 // indirect
41-
github.com/go-openapi/analysis v0.23.0 // indirect
42-
github.com/go-openapi/errors v0.22.0 // indirect
43-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
44-
github.com/go-openapi/jsonreference v0.21.0 // indirect
45-
github.com/go-openapi/loads v0.22.0 // indirect
46-
github.com/go-openapi/runtime v0.28.0 // indirect
47-
github.com/go-openapi/spec v0.21.0 // indirect
48-
github.com/go-openapi/strfmt v0.23.0 // indirect
49-
github.com/go-openapi/swag v0.23.0 // indirect
50-
github.com/go-openapi/validate v0.24.0 // indirect
41+
github.com/go-openapi/analysis v0.24.0 // indirect
42+
github.com/go-openapi/errors v0.22.3 // indirect
43+
github.com/go-openapi/jsonpointer v0.22.1 // indirect
44+
github.com/go-openapi/jsonreference v0.21.2 // indirect
45+
github.com/go-openapi/loads v0.23.1 // indirect
46+
github.com/go-openapi/runtime v0.29.0 // indirect
47+
github.com/go-openapi/spec v0.22.0 // indirect
48+
github.com/go-openapi/strfmt v0.24.0 // indirect
49+
github.com/go-openapi/swag v0.25.1 // indirect
50+
github.com/go-openapi/swag/cmdutils v0.25.1 // indirect
51+
github.com/go-openapi/swag/conv v0.25.1 // indirect
52+
github.com/go-openapi/swag/fileutils v0.25.1 // indirect
53+
github.com/go-openapi/swag/jsonname v0.25.1 // indirect
54+
github.com/go-openapi/swag/jsonutils v0.25.1 // indirect
55+
github.com/go-openapi/swag/loading v0.25.1 // indirect
56+
github.com/go-openapi/swag/mangling v0.25.1 // indirect
57+
github.com/go-openapi/swag/netutils v0.25.1 // indirect
58+
github.com/go-openapi/swag/stringutils v0.25.1 // indirect
59+
github.com/go-openapi/swag/typeutils v0.25.1 // indirect
60+
github.com/go-openapi/swag/yamlutils v0.25.1 // indirect
61+
github.com/go-openapi/validate v0.25.0 // indirect
5162
github.com/go-playground/locales v0.14.1 // indirect
5263
github.com/go-playground/universal-translator v0.18.1 // indirect
53-
github.com/go-playground/validator/v10 v10.27.0 // indirect
64+
github.com/go-playground/validator/v10 v10.28.0 // indirect
5465
github.com/go-resty/resty/v2 v2.16.5 // indirect
66+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
5567
github.com/gorilla/mux v1.8.1 // indirect
5668
github.com/gorilla/securecookie v1.1.2 // indirect
5769
github.com/gorilla/websocket v1.5.3 // indirect
5870
github.com/hashicorp/errwrap v1.1.0 // indirect
59-
github.com/josharian/intern v1.0.0 // indirect
6071
github.com/kataras/go-events v0.0.3 // indirect
6172
github.com/klauspost/compress v1.18.0 // indirect
6273
github.com/labstack/gommon v0.4.2 // indirect
6374
github.com/leodido/go-urn v1.4.0 // indirect
6475
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
65-
github.com/mailru/easyjson v0.7.7 // indirect
6676
github.com/mattn/go-colorable v0.1.14 // indirect
6777
github.com/mattn/go-isatty v0.0.20 // indirect
6878
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
@@ -71,18 +81,17 @@ require (
7181
github.com/mitchellh/go-ps v1.0.0 // indirect
7282
github.com/mitchellh/reflectwalk v1.0.2 // indirect
7383
github.com/muhlemmer/gu v0.3.1 // indirect
74-
github.com/nats-io/nats.go v1.45.0 // indirect
84+
github.com/nats-io/nats.go v1.47.0 // indirect
7585
github.com/nats-io/nkeys v0.4.11 // indirect
7686
github.com/nats-io/nuid v1.0.1 // indirect
7787
github.com/oklog/ulid v1.3.1 // indirect
78-
github.com/opentracing/opentracing-go v1.2.0 // indirect
79-
github.com/openziti/channel/v4 v4.2.21 // indirect
80-
github.com/openziti/edge-api v0.26.47 // indirect
81-
github.com/openziti/foundation/v2 v2.0.70 // indirect
82-
github.com/openziti/identity v1.0.109 // indirect
88+
github.com/openziti/channel/v4 v4.2.37 // indirect
89+
github.com/openziti/edge-api v0.26.50 // indirect
90+
github.com/openziti/foundation/v2 v2.0.77 // indirect
91+
github.com/openziti/identity v1.0.116 // indirect
8392
github.com/openziti/metrics v1.4.2 // indirect
84-
github.com/openziti/secretstream v0.1.38 // indirect
85-
github.com/openziti/transport/v2 v2.0.183 // indirect
93+
github.com/openziti/secretstream v0.1.39 // indirect
94+
github.com/openziti/transport/v2 v2.0.194 // indirect
8695
github.com/orcaman/concurrent-map/v2 v2.0.1 // indirect
8796
github.com/parallaxsecond/parsec-client-go v0.0.0-20221025095442-f0a77d263cf9 // indirect
8897
github.com/pkg/errors v0.9.1 // indirect
@@ -92,34 +101,34 @@ require (
92101
github.com/shoenig/go-m1cpu v0.1.6 // indirect
93102
github.com/speps/go-hashids v2.0.0+incompatible // indirect
94103
github.com/spf13/cast v1.10.0 // indirect
95-
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
104+
github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect
96105
github.com/stretchr/objx v0.5.2 // indirect
97106
github.com/tklauser/go-sysconf v0.3.12 // indirect
98107
github.com/tklauser/numcpus v0.6.1 // indirect
99108
github.com/valyala/bytebufferpool v1.0.0 // indirect
100109
github.com/valyala/fasttemplate v1.2.2 // indirect
101110
github.com/x448/float16 v0.8.4 // indirect
102111
github.com/yusufpapurcu/wmi v1.2.4 // indirect
103-
github.com/zeebo/errs v1.4.0 // indirect
104112
github.com/zitadel/logging v0.6.2 // indirect
105-
github.com/zitadel/oidc/v3 v3.44.0 // indirect
113+
github.com/zitadel/oidc/v3 v3.45.0 // indirect
106114
github.com/zitadel/schema v1.3.1 // indirect
107-
go.mongodb.org/mongo-driver v1.17.0 // indirect
115+
go.mongodb.org/mongo-driver v1.17.4 // indirect
108116
go.mozilla.org/pkcs7 v0.9.0 // indirect
109-
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
110-
go.opentelemetry.io/otel v1.37.0 // indirect
111-
go.opentelemetry.io/otel/metric v1.37.0 // indirect
112-
go.opentelemetry.io/otel/trace v1.37.0 // indirect
113-
golang.org/x/crypto v0.41.0 // indirect
114-
golang.org/x/net v0.43.0 // indirect
115-
golang.org/x/oauth2 v0.30.0 // indirect
116-
golang.org/x/sync v0.16.0 // indirect
117-
golang.org/x/sys v0.35.0 // indirect
118-
golang.org/x/term v0.34.0 // indirect
119-
golang.org/x/text v0.28.0 // indirect
117+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
118+
go.opentelemetry.io/otel v1.38.0 // indirect
119+
go.opentelemetry.io/otel/metric v1.38.0 // indirect
120+
go.opentelemetry.io/otel/trace v1.38.0 // indirect
121+
go.yaml.in/yaml/v3 v3.0.4 // indirect
122+
golang.org/x/crypto v0.42.0 // indirect
123+
golang.org/x/net v0.44.0 // indirect
124+
golang.org/x/oauth2 v0.31.0 // indirect
125+
golang.org/x/sync v0.17.0 // indirect
126+
golang.org/x/sys v0.36.0 // indirect
127+
golang.org/x/term v0.35.0 // indirect
128+
golang.org/x/text v0.29.0 // indirect
120129
golang.org/x/time v0.11.0 // indirect
121-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect
122-
google.golang.org/grpc v1.70.0 // indirect
123-
google.golang.org/protobuf v1.36.7 // indirect
130+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
131+
google.golang.org/grpc v1.75.0 // indirect
132+
google.golang.org/protobuf v1.36.10 // indirect
124133
nhooyr.io/websocket v1.8.17 // indirect
125134
)

0 commit comments

Comments
 (0)