Files
moxa/_test/map16.go
2019-06-05 09:50:44 +02:00

22 lines
270 B
Go

package main
import "fmt"
func main() {
users := make(map[string]string)
v, exists := users["a"]
fmt.Println(v, exists)
if exists == true {
//if exists {
fmt.Println("exists", v)
} else {
fmt.Println("not exists")
}
}
// Output:
// false
// not exists