Skip to content
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 Len() method to sync.Map #25112

Closed
kelwang opened this issue Apr 26, 2018 · 2 comments
Closed

sync: Add Len() method to sync.Map #25112

kelwang opened this issue Apr 26, 2018 · 2 comments

Comments

@kelwang
Copy link

kelwang commented Apr 26, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go 1.10.1

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

What did you do?

Try to find a easy way to get the length of sync.Map. Currently, the only way to call the Range func

What did you expect to see?

func (m *Map) Len() int

What did you see instead?

@adamdecaf
Copy link
Contributor

adamdecaf commented Apr 26, 2018

Duplicate of #20680 ?

@ianlancetaylor
Copy link
Contributor

Yes, closing as dup.

@golang golang locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants