Skip to content

Conversation

@cbandy
Copy link
Member

@cbandy cbandy commented Jul 24, 2025

The modernize analyzer of gopls also has a tool to apply fixes en masse. These are the changes produced by:

modernize -category=-omitzero -fix -test ./...

See: https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • Other

The "modernize" analyzer of "gopls" also has a tool to apply fixes en masse.
These are the changes produced by:

    modernize -category=-omitzero -fix -test ./...

See: https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
@cbandy cbandy enabled auto-merge (rebase) July 24, 2025 14:46
Copy link
Contributor

@benjaminjb benjaminjb left a comment

Choose a reason for hiding this comment

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

maps.Copy exists as far back as 1.23, so 👍

@cbandy cbandy merged commit fe0bd17 into CrunchyData:main Jul 24, 2025
20 checks passed
@cbandy cbandy deleted the modernize branch July 24, 2025 16:17
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