how to check if a value exists in map golang

178

how to check if a value exists in map golang -

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

Comments

Submit
0 Comments