build: update golang version to 1.24 and golangci-lint to v1.64.5 (#1949)

* build: update golang version to 1.24 and golangci-lint to v1.64.5

Signed-off-by: yxxhero <aiopsclub@163.com>

* build: update golang version to 1.24 in Dockerfiles

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix more issues

Signed-off-by: yxxhero <aiopsclub@163.com>

---------

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2025-02-28 12:10:16 +08:00 committed by GitHub
parent 025b76f973
commit 489b6c9362
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 7 additions and 9 deletions

View File

@ -20,7 +20,7 @@ jobs:
cache: false
- uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
version: v1.64.5
tests:
runs-on: ubuntu-latest

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder
RUN apk add --no-cache make git
WORKDIR /workspace/helmfile

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder
RUN apk add --no-cache make git
WORKDIR /workspace/helmfile

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder
RUN apk add --no-cache make git
WORKDIR /workspace/helmfile

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/helmfile/helmfile
go 1.23.1
go 1.24
require (
dario.cat/mergo v1.0.1

View File

@ -391,12 +391,10 @@ func RequiredEnv(name string) (string, error) {
func Required(warn string, val any) (any, error) {
if val == nil {
// nolint:govet,staticcheck
return nil, fmt.Errorf(warn)
return nil, fmt.Errorf("%s", warn)
} else if _, ok := val.(string); ok {
if val == "" {
// nolint:govet,staticcheck
return nil, fmt.Errorf(warn)
return nil, fmt.Errorf("%s", warn)
}
}