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
6 changed files with 7 additions and 9 deletions
+2 -4
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)
}
}