Skip to content

Apply fixes suggested by modernize #4218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025
Merged

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