Skip to content

chore: update Go version to 1.26.1#4052

Open
olegsu wants to merge 4 commits intomainfrom
chore/update-go-1.26.1
Open

chore: update Go version to 1.26.1#4052
olegsu wants to merge 4 commits intomainfrom
chore/update-go-1.26.1

Conversation

@olegsu
Copy link
Collaborator

@olegsu olegsu commented Mar 17, 2026

Summary

  • Update Go toolchain version to 1.26.1 across the project
  • Upgrade golangci-lint from 2.4.0 to 2.11.3 (required — 2.4.0 was built with Go 1.25 and can't lint Go 1.26.1 code)
  • Disable newly introduced revive rules that flag pre-existing code patterns
  • Fix 3 prealloc issues by preallocating slices with known capacity

Changes

Go version bump

File From To
.go-version 1.25.5 1.26.1
go.mod 1.25.5 1.26.1
scripts/update_assets_md/go.mod 1.24.0 1.26.1
docs/version.asciidoc 1.25.4 1.26.1
bin/.go-1.25.5.pkg renamed bin/.go-1.26.1.pkg
bin/go .go-1.25.5.pkg .go-1.26.1.pkg
bin/gofmt .go-1.25.5.pkg .go-1.26.1.pkg

golangci-lint upgrade

File From To
bin/.golangci-lint-2.4.0.pkg renamed bin/.golangci-lint-2.11.3.pkg
bin/golangci-lint .golangci-lint-2.4.0.pkg .golangci-lint-2.11.3.pkg
.golangci.yaml Disable 6 new revive rules

Prealloc fixes

  • internal/resources/fetching/fetchers/azure/assets_enricher.go
  • internal/resources/providers/awslib/rds/provider.go
  • internal/resources/providers/gcplib/inventory/provider.go

Test plan

  • CI pipeline passes with the new Go version
  • Linter passes (golangci-lint run exits 0)
  • Build and unit tests succeed

@olegsu olegsu requested a review from a team as a code owner March 17, 2026 19:55
Update Go toolchain version across the project:
- .go-version: 1.25.5 -> 1.26.1
- go.mod: 1.25.5 -> 1.26.1
- scripts/update_assets_md/go.mod: 1.24.0 -> 1.26.1
- docs/version.asciidoc: 1.25.4 -> 1.26.1
- Rename Hermit package bin/.go-1.25.5.pkg -> bin/.go-1.26.1.pkg
@olegsu olegsu force-pushed the chore/update-go-1.26.1 branch from fa8f318 to c7c1ece Compare March 17, 2026 20:33
olegsu added 3 commits March 17, 2026 15:50
golangci-lint 2.4.0 was built with Go 1.25 and refuses to lint Go 1.26.1
target code. Upgrade to 2.11.3 (built with Go 1.26.1) and address new
lint findings:
- Disable newly introduced revive rules that flag pre-existing code
  patterns (package-directory-mismatch, enforce-switch-style,
  use-waitgroup-go, use-slices-sort, identical-switch-branches,
  package-naming)
- Fix 3 prealloc issues by preallocating slices with known capacity
@mergify mergify bot assigned olegsu Mar 17, 2026
@mergify
Copy link

mergify bot commented Mar 17, 2026

This pull request does not have a backport label. Could you fix it @olegsu? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

Copy link
Member

@kubasobon kubasobon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants