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:
parent
025b76f973
commit
489b6c9362
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
cache: false
|
cache: false
|
||||||
- uses: golangci/golangci-lint-action@v6
|
- uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
version: v1.61.0
|
version: v1.64.5
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -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
|
RUN apk add --no-cache make git
|
||||||
WORKDIR /workspace/helmfile
|
WORKDIR /workspace/helmfile
|
||||||
|
|
|
||||||
|
|
@ -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
|
RUN apk add --no-cache make git
|
||||||
WORKDIR /workspace/helmfile
|
WORKDIR /workspace/helmfile
|
||||||
|
|
|
||||||
|
|
@ -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
|
RUN apk add --no-cache make git
|
||||||
WORKDIR /workspace/helmfile
|
WORKDIR /workspace/helmfile
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -1,6 +1,6 @@
|
||||||
module github.com/helmfile/helmfile
|
module github.com/helmfile/helmfile
|
||||||
|
|
||||||
go 1.23.1
|
go 1.24
|
||||||
|
|
||||||
require (
|
require (
|
||||||
dario.cat/mergo v1.0.1
|
dario.cat/mergo v1.0.1
|
||||||
|
|
|
||||||
|
|
@ -391,12 +391,10 @@ func RequiredEnv(name string) (string, error) {
|
||||||
|
|
||||||
func Required(warn string, val any) (any, error) {
|
func Required(warn string, val any) (any, error) {
|
||||||
if val == nil {
|
if val == nil {
|
||||||
// nolint:govet,staticcheck
|
return nil, fmt.Errorf("%s", warn)
|
||||||
return nil, fmt.Errorf(warn)
|
|
||||||
} else if _, ok := val.(string); ok {
|
} else if _, ok := val.(string); ok {
|
||||||
if val == "" {
|
if val == "" {
|
||||||
// nolint:govet,staticcheck
|
return nil, fmt.Errorf("%s", warn)
|
||||||
return nil, fmt.Errorf(warn)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue