We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, while researching for this Go proposal I noticed this code:
slices.Compact(labels)
which probably doesn't behave as intended and should look like this instead:
labels = slices.Compact(labels)
I have not tried to execute it.
The text was updated successfully, but these errors were encountered:
Interestingly enough... there's no need to compact labels. The items in labels come from map keys, which are by definition unique.
labels
That said... this is an opportunity to clean up some of the code. Thanks for pointing this out!
Sorry, something went wrong.
You may consider golang.org/x/exp/maps.Keys, which is handy.
For other interesting reasons, map.Keys is not yet part of the stdlib.
map.Keys
Successfully merging a pull request may close this issue.
Hello, while researching for this Go proposal I noticed this code:
which probably doesn't behave as intended and should look like this instead:
I have not tried to execute it.
The text was updated successfully, but these errors were encountered: