core: upgrade Go requirement to 1.26.0 (#8466)

* core: upgrade Go requirement to 1.26.0

As golang 1.27 has been released, this PR
- Bump Go version requirement to 1.26.0
- Update Go build version to 1.27.0

This is also for solving the issue encountered in 8092 of k8s update

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Bump golang ci

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Migrate faillint to forbidigo, as failint has not bee updated for more than a year

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

---------

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang
2026-09-10 19:34:44 -07:00
committed by GitHub
parent fb7e1d19fd
commit 4382b80a35
23 changed files with 99 additions and 120 deletions

View File

@@ -10,6 +10,7 @@ linters:
- canonicalheader
- copyloopvar
- durationcheck
- forbidigo
- godoclint
- gosec
- govet
@@ -43,6 +44,13 @@ linters:
- perfsprint
- gosec
settings:
forbidigo:
analyze-types: true
forbid:
- pattern: "^prometheus\\.(NewCounter|NewCounterVec|NewGauge|NewGaugeVec|NewGaugeFunc|NewHistogram|NewHistogramVec|NewSummary|NewSummaryVec)$"
pkg: "^github\\.com/prometheus/client_golang/prometheus$"
msg: use github.com/prometheus/client_golang/prometheus/promauto
govet:
enable:
- nilness