Skip to content

Commit

Permalink
Upgrade golang 1.23.4 (#481)
Browse files Browse the repository at this point in the history
* Upgrade golang 1.23.4
* Upgrade golangci-lint version

Signed-off-by: Marcos Yacob <marcosyacob@gmail.com>
  • Loading branch information
MarcosDY authored Jan 17, 2025
1 parent 175ac1c commit ed615dd
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.2
1.23.4
10 changes: 10 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,27 @@ linters:
- bodyclose
- durationcheck
- errorlint
- gofmt
- goimports
- revive
- gosec
- misspell
- nakedret
- nilerr
- unconvert
- unparam
- intrange
- whitespace
- gocritic
- wastedassign
- nolintlint

linters-settings:
govet:
enable:
- nilness
- sortslice
- unusedwrite
revive:
# minimal confidence for issues, default is 0.8
min-confidence: 0.0
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ endif
go_version := $(shell cat .go-version)
build_dir := $(DIR)/.build/$(os1)-$(arch1)

golangci_lint_version = v1.59.1
golangci_lint_version = v1.60.1
golangci_lint_dir = $(build_dir)/golangci_lint/$(golangci_lint_version)
golangci_lint_bin = $(golangci_lint_dir)/golangci-lint
golangci_lint_cache = $(golangci_lint_dir)/cache
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var _ = BeforeSuite(func() {
dialer := &net.Dialer{Timeout: time.Second}
addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort)
Eventually(func() error {
conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) // nolint: gosec // this is intentional for the unit test
conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) //nolint: gosec // this is intentional for the unit test
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion demo/greeter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.2-alpine AS builder
FROM golang:1.23.4-alpine AS builder
WORKDIR /workspace
COPY go.mod go.mod
COPY go.sum go.sum
Expand Down
2 changes: 1 addition & 1 deletion demo/greeter/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module greeter

go 1.22.2
go 1.23.4

require (
github.com/spiffe/go-spiffe/v2 v2.4.0
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/spiffe/spire-controller-manager

go 1.22.2
go 1.23.4

require (
github.com/go-logr/logr v1.4.2
Expand Down
2 changes: 1 addition & 1 deletion pkg/spireentry/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func stringList(ss []string) string {
func renderList(n int, fn func(i int, w io.StringWriter)) string {
var builder strings.Builder
builder.WriteRune('[')
for i := 0; i < n; i++ {
for i := range n {
if i > 0 {
builder.WriteRune(',')
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/spireentry/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ import (
const (
// joinTokenSpiffePrefix is the prefix that is the part of the parent SPIFFE ID for join token entries.
// Ref: /~https://github.com/spiffe/spire/blob/v1.8.7/pkg/server/api/agent/v1/service.go#L714
// nolint: gosec // not a credential
//nolint: gosec // not a credential
joinTokenSpiffePrefix = "/spire/agent/join_token/"

// joinTokenSelectorType is the selector type used in the selector for join token entries.
// Ref: /~https://github.com/spiffe/spire/blob/v1.8.7/pkg/server/api/agent/v1/service.go#L515
// nolint: gosec // not a credential
//nolint: gosec // not a credential
joinTokenSelectorType = "spiffe_id"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/webhookmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func dnsNamesEqual(a, b []string) bool {
if len(a) != len(b) {
return false
}
for i := 0; i < len(a); i++ {
for i := range a {
if a[i] != b[i] {
return false
}
Expand Down

0 comments on commit ed615dd

Please sign in to comment.