golang check if key is in map

199

golang check if key is in map -

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

Comments

Submit
0 Comments