Skip to content

Commit f2213d6

Browse files
authored
chore: use Go 1.24 tools management (#945)
1 parent cb365b2 commit f2213d6

File tree

8 files changed

+24
-29
lines changed

8 files changed

+24
-29
lines changed

Diff for: .github/workflows/focused-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ jobs:
1010
with:
1111
go-version: '1.24.1'
1212
- uses: actions/checkout@v4
13-
- run: go run github.com/onsi/ginkgo/v2/ginkgo unfocus && test -z "$(git status -s)"
13+
- run: go tool ginkgo unfocus && test -z "$(git status -s)"
1414

Diff for: Makefile

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ BROKER_GO_OPTS=PORT=8080 \
2828
GSB_PROVISION_DEFAULTS='$(GSB_PROVISION_DEFAULTS)'
2929

3030
PAK_PATH=$(PWD)
31-
RUN_CSB=$(BROKER_GO_OPTS) go run github.com/cloudfoundry/cloud-service-broker/v2
31+
RUN_CSB=$(BROKER_GO_OPTS) go tool cloud-service-broker
3232

3333
LDFLAGS="-X github.com/cloudfoundry/cloud-service-broker/v2/utils.Version=$(CSB_VERSION)"
3434
GET_CSB="env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags $(LDFLAGS) github.com/cloudfoundry/cloud-service-broker/v2"
@@ -71,11 +71,11 @@ test: lint run-integration-tests ## run the tests
7171

7272
.PHONY: run-integration-tests
7373
run-integration-tests: provider-tests ## run integration tests for this brokerpak
74-
cd ./integration-tests && go run github.com/onsi/ginkgo/v2/ginkgo -r .
74+
cd ./integration-tests && go tool ginkgo -r .
7575

7676
.PHONY: run-terraform-tests
7777
run-terraform-tests: ## run terraform tests for this brokerpak
78-
cd ./terraform-tests && go run github.com/onsi/ginkgo/v2/ginkgo -r .
78+
cd ./terraform-tests && go tool ginkgo -r .
7979

8080
.PHONY: provider-tests
8181
provider-tests: ## run the integration tests associated with providers
@@ -174,7 +174,7 @@ checkgoformat: ## checks that the Go code is formatted correctly
174174
fi
175175

176176
checkgoimports: ## checks that Go imports are formatted correctly
177-
@@if [ -n "$$(go run golang.org/x/tools/cmd/goimports -l -d -local csbbrokerpakazure .)" ]; then \
177+
@@if [ -n "$$(go tool goimports -l -d -local csbbrokerpakazure .)" ]; then \
178178
echo "goimports check failed: run 'make format'"; \
179179
exit 1; \
180180
fi
@@ -183,12 +183,12 @@ vet: ## runs go vet
183183
go vet ./...
184184

185185
staticcheck: ## runs staticcheck
186-
go run honnef.co/go/tools/cmd/staticcheck ./...
186+
go tool staticcheck ./...
187187

188188
.PHONY: format
189189
format: ## format the source
190190
gofmt -s -e -l -w .
191-
go run golang.org/x/tools/cmd/goimports -l -w -local csbbrokerpakazure .
191+
go tool goimports -l -w -local csbbrokerpakazure .
192192
terraform fmt --recursive
193193

194194
./providers/terraform-provider-csbmssqldbrunfailover/cloudfoundry.org/cloud-service-broker/csbmssqldbrunfailover:

Diff for: acceptance-tests/ginkgo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
go run github.com/onsi/ginkgo/v2/ginkgo "$@"
2+
go tool ginkgo "$@"

Diff for: go.mod

+9-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ require (
1616
github.com/onsi/gomega v1.36.2
1717
github.com/otiai10/copy v1.14.1
1818
golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
19-
golang.org/x/tools v0.31.0
2019
gopkg.in/yaml.v3 v3.0.1
21-
honnef.co/go/tools v0.6.1
2220
)
2321

2422
require (
@@ -129,6 +127,7 @@ require (
129127
golang.org/x/sys v0.31.0 // indirect
130128
golang.org/x/text v0.23.0 // indirect
131129
golang.org/x/time v0.10.0 // indirect
130+
golang.org/x/tools v0.31.0 // indirect
132131
google.golang.org/api v0.222.0 // indirect
133132
google.golang.org/genproto v0.0.0-20250219182151-9fdb1cabc7b2 // indirect
134133
google.golang.org/genproto/googleapis/api v0.0.0-20250219182151-9fdb1cabc7b2 // indirect
@@ -138,4 +137,12 @@ require (
138137
gorm.io/driver/mysql v1.5.7 // indirect
139138
gorm.io/driver/sqlite v1.5.7 // indirect
140139
gorm.io/gorm v1.25.12 // indirect
140+
honnef.co/go/tools v0.6.1 // indirect
141+
)
142+
143+
tool (
144+
github.com/cloudfoundry/cloud-service-broker/v2
145+
github.com/onsi/ginkgo/v2/ginkgo
146+
golang.org/x/tools/cmd/goimports
147+
honnef.co/go/tools/cmd/staticcheck
141148
)

Diff for: providers/terraform-provider-csbmssqldbrunfailover/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ clean: ## clean up build artifacts
2222

2323
.PHONY: test
2424
test: ## run the tests
25-
go run github.com/onsi/ginkgo/v2/ginkgo --label-filter="!acceptance" -r
25+
go tool ginkgo --label-filter="!acceptance" -r
2626

2727
.PHONY: run-acceptance-tests
2828
run-acceptance-tests: ## run the tests that are related to infrastructure
2929
export TF_ACC=1; \
30-
go run github.com/onsi/ginkgo/v2/ginkgo --label-filter="acceptance" -r -v
30+
go tool ginkgo --label-filter="acceptance" -r -v
3131

3232
.PHONY: run-acceptance-tests-coverage
3333
run-acceptance-tests-coverage: ## infrastructure tests coverage score

Diff for: providers/terraform-provider-csbmssqldbrunfailover/go.mod

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/v2 v2.0.0
99
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql v1.2.0
1010
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1
11-
github.com/onsi/ginkgo/v2 v2.23.0
11+
github.com/onsi/ginkgo/v2 v2.23.1
1212
github.com/onsi/gomega v1.36.2
1313
)
1414

@@ -74,3 +74,5 @@ require (
7474
google.golang.org/protobuf v1.36.3 // indirect
7575
gopkg.in/yaml.v3 v3.0.1 // indirect
7676
)
77+
78+
tool github.com/onsi/ginkgo/v2/ginkgo

Diff for: providers/terraform-provider-csbmssqldbrunfailover/go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx
162162
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
163163
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
164164
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
165-
github.com/onsi/ginkgo/v2 v2.23.0 h1:FA1xjp8ieYDzlgS5ABTpdUDB7wtngggONc8a7ku2NqQ=
166-
github.com/onsi/ginkgo/v2 v2.23.0/go.mod h1:zXTP6xIp3U8aVuXN8ENK9IXRaTjFnpVB9mGmaSRvxnM=
165+
github.com/onsi/ginkgo/v2 v2.23.1 h1:Ox0cOPv/t8RzKJUfDo9ZKtRvBOJY369sFJnl00CjqwY=
166+
github.com/onsi/ginkgo/v2 v2.23.1/go.mod h1:zXTP6xIp3U8aVuXN8ENK9IXRaTjFnpVB9mGmaSRvxnM=
167167
github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=
168168
github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY=
169169
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=

Diff for: tools/tools.go

-14
This file was deleted.

0 commit comments

Comments
 (0)