How to check if a map contains a key in Go?

Answer • 1 Asked • Jan 19 2020
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.

Write your answer...

On a mission to build Next-Gen Community Platform for Developers