You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, when I do reflect.ValueOf(m).MapKeys() where m is a map I get the slice of values from the map, not keys. The same issue with MapRange(), returned iterator returns values disregarding what do you call, Key() or Value(). Is that the correct behaviour or is that a bug?
You can try that behaviour here. I suppose the output should contain key1, two, sdkjf.
I'm using the latest version of Go 1.12.3, linux/amd64
The text was updated successfully, but these errors were encountered:
julieqiu
changed the title
MapKeys on map returns the slice of all values from map, not keys
reflect: MapKeys on map returns the slice of all values from map, not keys
Apr 22, 2019
Hello, when I do
reflect.ValueOf(m).MapKeys()
wherem
is a map I get the slice of values from the map, not keys. The same issue withMapRange()
, returned iterator returns values disregarding what do you call,Key()
orValue()
. Is that the correct behaviour or is that a bug?You can try that behaviour here. I suppose the output should contain
key1, two, sdkjf
.I'm using the latest version of Go 1.12.3, linux/amd64
My ENV is
The text was updated successfully, but these errors were encountered: