mirror of
https://github.com/SourceFellows/gobuch.git
synced 2026-01-09 06:00:49 +01: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