Skip to content

chore: bump Go to 1.26 and apply go fix modernizations#251

Merged
mitchnielsen merged 6 commits intomainfrom
go-1-26-fixes
Feb 18, 2026
Merged

chore: bump Go to 1.26 and apply go fix modernizations#251
mitchnielsen merged 6 commits intomainfrom
go-1-26-fixes

Conversation

@mitchnielsen
Copy link
Member

@mitchnielsen mitchnielsen commented Feb 17, 2026

Summary

Bumps Go to 1.26 and applies the automated fixes from go fix ./... to modernize the codebase:

  • Use new() builtin instead of k8s.io/utils/ptr.To() for generic pointer construction (drops k8s.io/utils as a direct dependency)
  • Replace interface{} with the any type alias
  • Use maps.Copy from the standard library instead of manual for-range map copying
  • Use strings.Contains, strings.Cut, and strings.SplitSeq instead of older string functions
  • Use for range N integer range syntax

All changes were produced by go fix, just split into separate commits by category.

🤖 Generated with Claude Code

Related to https://linear.app/prefect/issue/PLA-2340/apply-go-fix-changes-from-go-126

mitchnielsen and others added 6 commits February 17, 2026 16:47
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace strings.Index with strings.Contains and strings.Cut, and
strings.Split with strings.SplitSeq for iterator-based iteration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace manual for-range map copy loops with maps.Copy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Go 1.26 allows new() to be used with type parameters, replacing the
need for the k8s.io/utils/ptr.To helper. This also includes the
remaining interface{} to any changes in test files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mitchnielsen mitchnielsen self-assigned this Feb 17, 2026
@mitchnielsen mitchnielsen added the maintenance Maintenance-related changes label Feb 17, 2026
@mitchnielsen mitchnielsen changed the title Bump Go to 1.26 and apply go fix modernizations chore: bump Go to 1.26 and apply go fix modernizations Feb 17, 2026
@mitchnielsen mitchnielsen marked this pull request as ready for review February 17, 2026 23:09
@mitchnielsen mitchnielsen requested review from a team as code owners February 17, 2026 23:09
Copy link
Collaborator

@chrisguidry chrisguidry left a comment

Choose a reason for hiding this comment

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

Wonderful! Thank you!

@mitchnielsen mitchnielsen merged commit 8b59f42 into main Feb 18, 2026
4 of 5 checks passed
@mitchnielsen mitchnielsen deleted the go-1-26-fixes branch February 18, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance-related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants