how to check if value exiets in map in go

172

how to check if value exiets in map in go -

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

Comments

Submit
0 Comments