mirror of
https://github.com/SourceFellows/gobuch.git
synced 2025-08-03 13:12:16 +02:00
initial import
This commit is contained in:
14
best-practices/map-contains/main.go
Normal file
14
best-practices/map-contains/main.go
Normal file
@ -0,0 +1,14 @@
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user