Skip to content

Commit 03dc948

Browse files
authored
chore: bump go version to 1.24 (#1697)
* chore: upgrade crpto to v0.37.0 * chore: upgrade mimetype * chore: upgrade x/net * chore: upgrade golangci-lint * chore: update .golangci.yml * chore: upgrade go to 1.24 * chore: disable printf linter in .golangci.yml * chore: disable go vet when running go test * chore: upgrade github.com/spf13/viper * chore: update go version in pipelines
1 parent b72ff4b commit 03dc948

File tree

1,369 files changed

+226126
-159905
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,369 files changed

+226126
-159905
lines changed

.github/workflows/nightly-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Go
1717
uses: actions/setup-go@v4
1818
with:
19-
go-version: 1.21.x
19+
go-version: 1.24.x
2020

2121
- name: Run linting
2222
id: update
@@ -80,7 +80,7 @@ jobs:
8080
- name: Setup Go
8181
uses: actions/setup-go@v4
8282
with:
83-
go-version: 1.21.x
83+
go-version: 1.24.x
8484

8585
- name: Build cross-platform binaries
8686
run: |

.github/workflows/prepare-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Go
1717
uses: actions/setup-go@v4
1818
with:
19-
go-version: 1.21.x
19+
go-version: 1.24.x
2020

2121
- name: Prepare release
2222
env:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup Go
2828
uses: actions/setup-go@v4
2929
with:
30-
go-version: 1.21.x
30+
go-version: 1.24.x
3131

3232
- name: Set up Docker Buildx
3333
id: buildx

.github/workflows/test-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup Go
2020
uses: actions/setup-go@v4
2121
with:
22-
go-version: 1.21.x
22+
go-version: 1.24.x
2323

2424
- name: Run linting
2525
id: update
@@ -83,7 +83,7 @@ jobs:
8383
- name: Setup Go
8484
uses: actions/setup-go@v4
8585
with:
86-
go-version: 1.21.x
86+
go-version: 1.24.x
8787

8888
- name: Build cross-platform binaries
8989
run: |

.go-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.21.0
1+
1.24.0

.golangci.yml

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1+
version: "2"
2+
13
run:
2-
deadline: 5m
4+
timeout: 5m
35
tests: false
46
modules-download-mode: vendor
57

6-
linters-settings:
7-
lll:
8-
line-length: 120
9-
108
linters:
119
enable:
1210
- lll
11+
disable:
12+
# TODO: remove these two and fix all the lint errors
13+
- errcheck
14+
- staticcheck
15+
settings:
16+
lll:
17+
line-length: 120
18+
govet:
19+
disable:
20+
# TODO: remove and fix all the lint errors
21+
- printf
22+
exclusions:
23+
rules:
24+
- path: internal/databox/blob.go
25+
linters:
26+
- lll

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ default: ci
33
ci: lint test fmt-check imports-check integration
44

55
# Tooling versions
6-
GOLANGCILINTVERSION?=1.54.1
6+
GOLANGCILINTVERSION?=2.1.2
77
GOIMPORTSVERSION?=v0.1.12
88
GOXVERSION?=v1.0.1
9-
GOTESTSUMVERSION?=v1.8.2
9+
GOTESTSUMVERSION?=v1.12.1
1010
GOJUNITVERSION?=v2.0.0
1111
PROTOCGENGOVERSION?=v1.28
1212
PROTOCGENGOGRPCVERSION?=v1.2
@@ -67,7 +67,7 @@ test: prepare test-only ## Run all go-sdk tests
6767
test-only: ## Run all go-sdk tests only (without prepare)
6868
$(eval PACKAGES := $(shell go list ./... | grep -v integration))
6969
gotestsum -f testname --packages="$(PACKAGES)" \
70-
-- -v -cover -run=$(regex) -coverprofile=$(COVERAGEOUT) $(PACKAGES)
70+
-- -vet=off -v -cover -run=$(regex) -coverprofile=$(COVERAGEOUT) $(PACKAGES)
7171

7272
.PHONY: integration
7373
integration: build-cli-cross-platform integration-only ## Build and run integration tests

go.mod

+50-40
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module github.com/lacework/go-sdk/v2
22

3-
go 1.21
3+
go 1.24
44

55
require (
66
aead.dev/minisign v0.2.0
7-
cloud.google.com/go/compute v1.19.1
8-
cloud.google.com/go/compute/metadata v0.2.3
9-
cloud.google.com/go/oslogin v1.9.0
10-
cloud.google.com/go/resourcemanager v1.7.0
7+
cloud.google.com/go/compute v1.29.0
8+
cloud.google.com/go/compute/metadata v0.6.0
9+
cloud.google.com/go/oslogin v1.14.2
10+
cloud.google.com/go/resourcemanager v1.10.2
1111
github.com/AlecAivazis/survey/v2 v2.3.2
1212
github.com/BurntSushi/toml v1.3.2
1313
github.com/Masterminds/semver v1.5.0
@@ -38,16 +38,16 @@ require (
3838
github.com/peterbourgon/diskv/v3 v3.0.1
3939
github.com/pkg/errors v0.9.1
4040
github.com/spf13/cobra v1.7.0
41-
github.com/spf13/pflag v1.0.5
42-
github.com/spf13/viper v1.13.0
41+
github.com/spf13/pflag v1.0.6
42+
github.com/spf13/viper v1.20.1
4343
github.com/stretchr/testify v1.10.0
4444
github.com/zclconf/go-cty v1.12.1
4545
go.uber.org/zap v1.24.0
46-
golang.org/x/crypto v0.31.0
47-
golang.org/x/net v0.33.0 // indirect
48-
golang.org/x/text v0.21.0
49-
google.golang.org/grpc v1.56.3
50-
google.golang.org/protobuf v1.33.0
46+
golang.org/x/crypto v0.37.0
47+
golang.org/x/net v0.39.0 // indirect
48+
golang.org/x/text v0.24.0
49+
google.golang.org/grpc v1.67.3
50+
google.golang.org/protobuf v1.36.1
5151
gopkg.in/yaml.v2 v2.4.0
5252
gopkg.in/yaml.v3 v3.0.1
5353
)
@@ -56,26 +56,27 @@ require (
5656
github.com/aws/aws-sdk-go-v2/service/iam v1.18.23
5757
github.com/aws/aws-sdk-go-v2/service/ssm v1.33.1
5858
github.com/aws/smithy-go v1.13.5
59-
github.com/gabriel-vasile/mimetype v1.4.2
59+
github.com/gabriel-vasile/mimetype v1.4.8
6060
github.com/go-git/go-git/v5 v5.13.0
6161
github.com/go-resty/resty/v2 v2.11.0
62-
github.com/golang/protobuf v1.5.3
63-
github.com/google/uuid v1.3.0
62+
github.com/golang/protobuf v1.5.4
63+
github.com/google/uuid v1.6.0
6464
github.com/hashicorp/consul/sdk v0.13.1
6565
github.com/mattn/go-isatty v0.0.18
6666
github.com/mitchellh/hashstructure/v2 v2.0.2
6767
github.com/otiai10/copy v1.14.0
6868
github.com/pmezard/go-difflib v1.0.0
69-
github.com/spf13/cast v1.5.0
69+
github.com/spf13/cast v1.7.1
7070
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
71-
google.golang.org/api v0.114.0
72-
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
71+
google.golang.org/api v0.215.0
7372
)
7473

7574
require (
76-
cloud.google.com/go v0.110.0 // indirect
77-
cloud.google.com/go/iam v0.13.0 // indirect
78-
cloud.google.com/go/longrunning v0.4.1 // indirect
75+
cloud.google.com/go v0.116.0 // indirect
76+
cloud.google.com/go/auth v0.13.0 // indirect
77+
cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect
78+
cloud.google.com/go/iam v1.2.2 // indirect
79+
cloud.google.com/go/longrunning v0.6.2 // indirect
7980
dario.cat/mergo v1.0.0 // indirect
8081
github.com/Microsoft/go-winio v0.6.1 // indirect
8182
github.com/ProtonMail/go-crypto v1.1.3 // indirect
@@ -98,53 +99,62 @@ require (
9899
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect
99100
github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01 // indirect
100101
github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 // indirect
101-
github.com/fsnotify/fsnotify v1.5.4 // indirect
102+
github.com/felixge/httpsnoop v1.0.4 // indirect
103+
github.com/fsnotify/fsnotify v1.8.0 // indirect
102104
github.com/gammazero/deque v0.2.0 // indirect
103105
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
104106
github.com/go-git/go-billy/v5 v5.6.0 // indirect
107+
github.com/go-logr/logr v1.4.2 // indirect
108+
github.com/go-logr/stdr v1.2.2 // indirect
109+
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
105110
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
106111
github.com/google/btree v1.1.2 // indirect
107112
github.com/google/go-cmp v0.6.0 // indirect
108-
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
109-
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
113+
github.com/google/s2a-go v0.1.8 // indirect
114+
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
115+
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
110116
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
111-
github.com/hashicorp/hcl v1.0.0 // indirect
112117
github.com/inconshreveable/mousetrap v1.1.0 // indirect
113118
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
114119
github.com/jmespath/go-jmespath v0.4.0 // indirect
115120
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
116121
github.com/kevinburke/ssh_config v1.2.0 // indirect
117122
github.com/klauspost/compress v1.16.6 // indirect
118123
github.com/kr/pty v1.1.8 // indirect
119-
github.com/magiconair/properties v1.8.6 // indirect
120124
github.com/mattn/go-colorable v0.1.13 // indirect
121125
github.com/mattn/go-runewidth v0.0.9 // indirect
122126
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
123127
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect
124-
github.com/pelletier/go-toml v1.9.5 // indirect
125-
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
128+
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
126129
github.com/pjbgf/sha1cd v0.3.0 // indirect
127130
github.com/russross/blackfriday/v2 v2.1.0 // indirect
131+
github.com/sagikazarmark/locafero v0.7.0 // indirect
128132
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
129133
github.com/skeema/knownhosts v1.3.0 // indirect
130-
github.com/spf13/afero v1.8.2 // indirect
131-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
132-
github.com/subosito/gotenv v1.4.1 // indirect
134+
github.com/sourcegraph/conc v0.3.0 // indirect
135+
github.com/spf13/afero v1.12.0 // indirect
136+
github.com/subosito/gotenv v1.6.0 // indirect
133137
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
134138
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
135139
github.com/xanzy/ssh-agent v0.3.3 // indirect
136-
go.opencensus.io v0.24.0 // indirect
137-
go.uber.org/atomic v1.7.0 // indirect
138-
go.uber.org/multierr v1.6.0 // indirect
140+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
141+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
142+
go.opentelemetry.io/otel v1.29.0 // indirect
143+
go.opentelemetry.io/otel/metric v1.29.0 // indirect
144+
go.opentelemetry.io/otel/trace v1.29.0 // indirect
145+
go.uber.org/atomic v1.9.0 // indirect
146+
go.uber.org/multierr v1.9.0 // indirect
139147
golang.org/x/mod v0.19.0 // indirect
140-
golang.org/x/oauth2 v0.7.0 // indirect
141-
golang.org/x/sync v0.10.0 // indirect
142-
golang.org/x/sys v0.28.0 // indirect
143-
golang.org/x/term v0.27.0 // indirect
148+
golang.org/x/oauth2 v0.25.0 // indirect
149+
golang.org/x/sync v0.13.0 // indirect
150+
golang.org/x/sys v0.32.0 // indirect
151+
golang.org/x/term v0.31.0 // indirect
152+
golang.org/x/time v0.8.0 // indirect
144153
golang.org/x/tools v0.23.0 // indirect
145-
google.golang.org/appengine v1.6.7 // indirect
154+
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
155+
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
156+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 // indirect
146157
gopkg.in/alexcesaro/statsd.v2 v2.0.0 // indirect
147-
gopkg.in/ini.v1 v1.67.0 // indirect
148158
gopkg.in/warnings.v0 v0.1.2 // indirect
149159
)
150160

0 commit comments

Comments
 (0)