chore: upgrade Go toolchain to 1.25 and bump helm to v3.20.2 (#679)

* chore: upgrade Go toolchain to 1.25 and bump helm to v3.20.2

Upgrades Go from 1.24 to 1.25 in go.mod and CI workflow to fix
golangci-lint compatibility. Includes helm.sh/helm/v3 bump to v3.20.2.

Supersedes #678.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): upgrade golangci-lint-action to v7 for Go 1.25 support

Action v4 installs golangci-lint v1.x which was built with Go 1.24
and refuses to lint Go 1.25 code. Action v7 uses golangci-lint v2.x
built with Go 1.25+.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve golangci-lint v2 warnings

Handle Body.Close error returns and remove redundant embedded field
selector to satisfy stricter golangci-lint v2 defaults.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Andrey Pokhilko
2026-04-11 09:27:15 +01:00
committed by GitHub
parent cbbe941761
commit d8411ae0dc
6 changed files with 151 additions and 193 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ func QueryArtifactHub(chartName string) ([]*ArtifactHubResult, error) {
if err != nil {
return nil, err
}
defer res.Body.Close()
defer func() { _ = res.Body.Close() }()
if res.StatusCode != 200 {
return nil, fmt.Errorf("failed to fetch %s : %s", p.String(), res.Status)
+1 -1
View File
@@ -213,7 +213,7 @@ func (r *Repositories) GetChartValues(chart string, ver string) (string, error)
client := action.NewShowWithConfig(action.ShowValues, r.HelmConfig)
client.Version = ver
cp, err := client.ChartPathOptions.LocateChart(chart, r.Settings)
cp, err := client.LocateChart(chart, r.Settings)
if err != nil {
return "", err
}
+2 -2
View File
@@ -129,7 +129,7 @@ func (s *Server) itIsUs() bool {
log.Debugf("It's not us on %s: %s", s.Address, err)
return false
}
defer r.Body.Close()
defer func() { _ = r.Body.Close() }()
return strings.HasPrefix(r.Header.Get("X-Application-Name"), "Helm Dashboard")
}
@@ -146,7 +146,7 @@ func checkUpgrade(d *objects.StatusInfo) { // TODO: check it once an hour
log.Warnf("Failed to check for new version: %s", err)
return
}
defer r.Body.Close()
defer func() { _ = r.Body.Close() }()
target := new(GHRelease)
err = json.NewDecoder(r.Body).Decode(target)