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.
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.