You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
golang-tutorial/demo/channel/demo01.go

22 lines
295 B

package main
import (
"fmt"
)
func main() {
var m map[string]string
if m == nil {
fmt.Println("this is nil map")
}
m = make(map[string]string)
m["name"] = "Tinywan"
fmt.Println(m)
m1 := map[string]int{}
fmt.Println(m1)
m1["age"] = 24
m1["dateTime"] = 20180909
fmt.Println(m1)
}