-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
sync: add Map.Clear method #61696
Comments
CC @bcmills |
Change https://go.dev/cl/515015 mentions this issue: |
@ianlancetaylor Maybe this should a release blocker for 1.21? |
Unfortunately it's too late for 1.21. And I don't see why it would be a release blocker anyhow. While I agree that the predeclared |
All right, my idea is that since the built-in clear operation is provided, sync version should also provide the same capability, but you said that it is too late for 1.21, it is make sense, after all, we can work without clear for many years. Anyway, it's useful to land on 1.22 and it's not too late. |
I agree that a That said, since This interacts in interesting ways with existing |
This proposal has been added to the active column of the proposals project |
I think "delete everything" is fine. |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
The time to freeze the code is very close. Should CL515051 be merged into go1.22? |
dam, I just saw this in the golang std reference and thought it was an actual function. |
Change https://go.dev/cl/561755 mentions this issue: |
Fix https://go-review.git.corp.google.com/c/go/+/561456 For #61696 Change-Id: I573bd14cf0e5c41adcc8c2b9481e85c5792c2a82 GitHub-Last-Rev: c6fce6d GitHub-Pull-Request: #65534 Reviewed-on: https://go-review.googlesource.com/c/go/+/561755 Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]>
Fixes golang#61696 Change-Id: I0a31afd3bc433fc84280d56f2798bda10da61eba GitHub-Last-Rev: 17bedc8 GitHub-Pull-Request: golang#61702 Reviewed-on: https://go-review.googlesource.com/c/go/+/515015 Auto-Submit: Bryan Mills <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: qiulaidongfeng <[email protected]> Reviewed-by: Bryan Mills <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Fix https://go-review.git.corp.google.com/c/go/+/561456 For golang#61696 Change-Id: I573bd14cf0e5c41adcc8c2b9481e85c5792c2a82 GitHub-Last-Rev: c6fce6d GitHub-Pull-Request: golang#65534 Reviewed-on: https://go-review.googlesource.com/c/go/+/561755 Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]>
Since we have landed #56351 for clear builtin map, but we seems forget the sync variant
sync.Map
, let's do it!The text was updated successfully, but these errors were encountered: