Skip to content

go fix, minor linting fixes, and simplify Windows compatibility release lookup - #37

Merged
estesp merged 2 commits into
containerd:mainfrom
thaJeztah:modernize
Oct 30, 2026
Merged

estesp merged 2 commits into
containerd:mainfrom
thaJeztah:modernize

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

Use slices.Backward, as suggested by go fix, to iterate over LTSC releases in reverse order.

Default the compatibility floor to the first release and update it only when the matching release has a predecessor. Adjust the comments to describe the fallback. Compatibility behavior is unchanged.

Use slices.Backward, as suggested by go fix, to iterate over LTSC
releases in reverse order.

Default the compatibility floor to the first release and update it
only when the matching release has a predecessor. Adjust the comments
to describe the fallback. Compatibility behavior is unchanged.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the compatibility and test-code changes.

No open issues 🎉

What changed in this PR

Modernizes Windows compatibility lookup and simplifies test code without changing intended behavior.

Changes:

  • Uses slices.Backward to scan LTSC releases, defaulting the compatibility floor to the first release.
  • Clarifies Windows build-matching and fallback comments.
  • Removes redundant test branching and loop-variable copies.
File Description
platform_windows_compat.go Simplifies reverse LTSC lookup and clarifies compatibility comments.
cpuinfo_linux_test.go Removes an unnecessary else after a fatal assertion.
compare_test.go Uses loop variables directly and removes redundant copies.

Review effort: Balanced

@estesp
estesp merged commit 89ef66d into containerd:main Oct 30, 2026
7 checks passed
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.

4 participants