Answers for "golang check if map has key"

Go
6

golang map has key

if val, ok := dict["foo"]; ok {
    //do something here
}
Posted by: Guest on February-23-2020

Browse Popular Code Answers by Language