how to check if a value exists in map golang

182

how to check if a value exists in map golang -

if val, ok := dict["foo"]; ok {
    //do something here
}

Comments

Submit
0 Comments