Skip to content

Commit 2910d17

Browse files
authored
feat: Build with go 1.23 (#889)
1 parent e2e4a68 commit 2910d17

File tree

12 files changed

+389
-437
lines changed

12 files changed

+389
-437
lines changed

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@ checksum:
154154
name_template: 'checksums.txt'
155155

156156
snapshot:
157-
name_template: "{{ incminor .Tag }}-dev"
157+
version_template: "{{ incminor .Tag }}-dev"

api/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/ap
55

66
go 1.22.0
77

8-
toolchain go1.22.5
8+
toolchain go1.23.0
99

1010
replace github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common => ../common
1111

api/v1alpha1/nutanix_clusterconfig_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ type NutanixPrismCentralEndpointCredentials struct {
5555
}
5656

5757
//nolint:gocritic // No need for named return values
58-
func (s NutanixPrismCentralEndpointSpec) ParseURL() (string, int32, error) {
58+
func (s NutanixPrismCentralEndpointSpec) ParseURL() (string, uint16, error) {
5959
var prismCentralURL *url.URL
6060
prismCentralURL, err := url.Parse(s.URL)
6161
if err != nil {
62-
return "", -1, fmt.Errorf("error parsing Prism Central URL: %w", err)
62+
return "", 0, fmt.Errorf("error parsing Prism Central URL: %w", err)
6363
}
6464

6565
hostname := prismCentralURL.Hostname()
@@ -69,10 +69,10 @@ func (s NutanixPrismCentralEndpointSpec) ParseURL() (string, int32, error) {
6969
return hostname, DefaultPrismCentralPort, nil
7070
}
7171

72-
port, err := strconv.ParseInt(prismCentralURL.Port(), 10, 32)
72+
port, err := strconv.ParseUint(prismCentralURL.Port(), 10, 16)
7373
if err != nil {
74-
return "", -1, fmt.Errorf("error converting port to int: %w", err)
74+
return "", 0, fmt.Errorf("error converting port to int: %w", err)
7575
}
7676

77-
return hostname, int32(port), nil
77+
return hostname, uint16(port), nil //nolint:gosec // Bounds are checked by ParseUint call above.
7878
}

common/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/co
55

66
go 1.22.0
77

8-
toolchain go1.22.5
8+
toolchain go1.23.0
99

1010
replace github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/api => ../api
1111

devbox.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"golines@latest",
1717
"goreleaser@latest",
1818
"gotestsum@latest",
19-
"govulncheck@latest",
2019
"helm-docs@latest",
2120
"hugo@latest",
2221
"kind@latest",
@@ -36,6 +35,7 @@
3635
"path:./hack/flakes#go-mod-upgrade",
3736
"path:./hack/flakes#golangci-lint",
3837
"path:./hack/flakes#goprintconst",
38+
"path:./hack/flakes#govulncheck",
3939
"path:./hack/flakes#helm-with-plugins",
4040
"path:./hack/flakes#release-please",
4141
"path:./hack/flakes#setup-envtest"

0 commit comments

Comments
 (0)