gobuch/best-practices/map-contains/main.go
2020-08-21 06:26:40 +02:00

15 lines
170 B
Go

package main
import "fmt"
func main() {
m := make(map[string]string)
m["key1"] = "value1"
if v, ok := m["key2"]; ok {
fmt.Printf("Wert %v enthalten\n", v)
}
}