Skip to content

Commit

Permalink
Updates Go to 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
reederc42 authored Oct 1, 2024
1 parent 2b4fe27 commit 169581e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: checks
env:
GO_VERSION: '1.22'
GO_VERSION: '1.23'
on:
pull_request:
branches:
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
- name: golangci-lint
# Switch back to the official action after this bug is fixed: https://github.com/golangci/golangci-lint/issues/3107
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.58.1
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
$(go env GOPATH)/bin/golangci-lint run --out-format=github-actions --timeout=15m --verbose
go-mod-tidy:
name: go mod tidy
Expand Down
23 changes: 7 additions & 16 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
run:
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 5m
go: 1.23

linters:
disable-all: true
Expand All @@ -13,7 +12,6 @@ linters:
- govet
- errcheck
- gosec
# - lll

issues:
exclude-rules:
Expand All @@ -31,16 +29,7 @@ issues:

linters-settings:
gofumpt:
# Select the Go version to target.
# Default: 1.15
lang-version: "1.22"

# Choose whether to use the extra rules.
# Default: false
extra-rules: true

# Module path which contains the source code being formatted.
# Default: empty string
module-path: github.com/netapp/trident

goimports:
Expand All @@ -51,14 +40,16 @@ linters-settings:
lll:
# Max line length, lines longer will be reported.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option.
# Default: 120.
line-length: 120
# Tab width in spaces.
# Default: 1
tab-width: 4

gosec:
excludes:
# Exclude TLS client side erorrs for now, until Trident fully supports TLS1.3
- 'G402' # Look for bad TLS connection settings
# Exclude TLS client side erorrs for now, until Trident fully supports TLS1.3
- G402 # Look for bad TLS connection settings
- G115

govet:
disable:
- printf
8 changes: 4 additions & 4 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

* Docker-compatible container cli, such as nerdctl or docker
* Make, if not building natively or with linker flags
* Go 1.21 or greater, to optionally build Trident natively
* Go 1.23 or greater, to optionally build Trident natively

### Multi-Platform

* Make
* Docker
* Go 1.21 or greater, to optionally build Trident binaries natively
* Go 1.23 or greater, to optionally build Trident binaries natively
* jq

## Makefile Parameters
Expand All @@ -32,7 +32,7 @@ Container registry used to tag images and manifests, and optionally to push imag

`GO_IMAGE`

Default: `golang:1.22`
Default: `golang:1.23`

Container image used by default `$GO_SHELL` to run binary build scripts.

Expand All @@ -48,7 +48,7 @@ Overrides default Go proxy.

`HELM_IMAGE`

Default: `alpine/helm:3.6.1`
Default: `alpine/helm:3.16.1`

Container image used by default `$HELM_CMD` to package helm chart.

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ REGISTRY ?= $(DEFAULT_REGISTRY)
BUILDX_OUTPUT ?= load

# GO_IMAGE golang image used in default GO_SHELL
GO_IMAGE ?= golang:1.22
GO_IMAGE ?= golang:1.23

# GO_CMD go command used for go build
GO_CMD ?= go
Expand All @@ -26,7 +26,7 @@ GOPROXY ?=
GOFLAGS ?=

# HELM_IMAGE helm image used in default HELM_CMD
HELM_IMAGE ?= alpine/helm:3.6.1
HELM_IMAGE ?= alpine/helm:3.16.1

# HELM_CHART_VERSION overrides the default chart version
HELM_CHART_VERSION ?=
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/netapp/trident

go 1.22.0
go 1.23.0

require (
cloud.google.com/go/netapp v1.1.0 // https://pkg.go.dev/cloud.google.com/go/netapp
Expand Down

0 comments on commit 169581e

Please sign in to comment.