I know I can iterate over a map m by,

for k, v := range m { ... }

and look for a key but is there a more efficient way of testing a key’s existence in a map?

I couldn’t find the answer in the language spec.

1Best Answer
11


recommended by
Go Language

Leave a Reply

Your email address will not be published. Required fields are marked *