how to check if value exiets in map in go

168

how to check if value exiets in map in go -

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

Comments

Submit
0 Comments