Skip to content

Conversation

@cce
Copy link
Contributor

@cce cce commented Sep 4, 2025

Summary

This runs the official golang tool modernize with the mapsloop fix.

Test Plan

Existing tests should pass

algorandskiy
algorandskiy previously approved these changes Sep 4, 2025
jannotti
jannotti previously approved these changes Sep 4, 2025
Copy link
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

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

These are all good. In many cases, maps.Clone() would be even better. I suspect the tool doesn't do that replacement because map.Clone() is nil-preserving, while these code snippets generally allocate a 0 sized map instead. We'd have to check to see if that's ok.

@cce cce dismissed stale reviews from jannotti and algorandskiy via 6335bed September 5, 2025 00:12
algorandskiy
algorandskiy previously approved these changes Sep 5, 2025
@cce cce requested a review from jannotti September 5, 2025 14:27
@jannotti jannotti merged commit fc11afb into algorand:master Sep 5, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants