You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Dear list,
I'm trying to map unicode string ([]rune) to some other type. I got this error message "invalid map key type []rune". And I found it's not rune, it's that the key can't be slice. A string is in the end a slice of bytes, why it can be map key while other slices can't?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Andy W. Song, golang-nuts
slices are reference types. Strings are immutable. I would expect that arrays can be slice keys as of Go 1, as are structs (though my memory could just be fuzzy). Only things on which equality is defined, basically. (note that funcs no longer satisfy this)
Andy W. Song
unread,
Feb 9, 2012, 7:02:37 PM2/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message