Skip to content

Conversation

jakebailey
Copy link
Member

I think there's a proposal to add this exact type to the stdlib eventually, but I'm finding it increasingly annoying to deal with any when making new sync.Maps.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

internal/collections/syncmap.go:31

  • Ensure that the underlying sync.Map's Clear() method is supported in the target Go version. If targeting an older version that lacks Clear(), consider implementing a manual clear using Range and Delete.
s.m.Clear()

@@ -0,0 +1,59 @@
package collections
Copy link
Member Author

Choose a reason for hiding this comment

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

This is here in core so that leaf packages like cachedvfs don't need to import core.

@jakebailey jakebailey enabled auto-merge April 8, 2025 23:58
@jakebailey jakebailey added this pull request to the merge queue Apr 8, 2025
Merged via the queue into main with commit e772e8f Apr 9, 2025
23 checks passed
@jakebailey jakebailey deleted the jabaile/syncmap branch April 9, 2025 00:06
zshannon pushed a commit to zshannon/typescript-go that referenced this pull request Oct 6, 2025
zshannon pushed a commit to zshannon/typescript-go that referenced this pull request Oct 6, 2025
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