How To Check If Value Exiets In Map In Go

[Solved] How To Check If Value Exiets In Map In Go | Go - Code Explorer | yomemimo.com
Question : how to check if a value exists in map golang

Answered by : pleasant-panther-eckhw3dwgn9y

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

Source : https://stackoverflow.com/questions/2050391/how-to-check-if-a-map-contains-a-key-in-go | Last Update : Sun, 01 Mar 20

Answers related to how to check if value exiets in map in go

Code Explorer Popular Question For Go