mm2["erlang"] = 50
mm2["scala"] = 25
delete(mm2, "python")
mm2["scala"] = 25
delete(mm2, "python")
2018-04-04
第一个 go 方法在 sender <- number 时候,因为 sender 为非缓冲,被阻塞,直到第二个 go 函数将 myChannel 中写入的值取出,再重新执行 fmt.Println("Sent!")
2018-03-27
难道是我想简单化了???
val := fibonacci(i)
fmt.Printf("%d ", val)
defer fmt.Printf("%d ", val)
val := fibonacci(i)
fmt.Printf("%d ", val)
defer fmt.Printf("%d ", val)
2018-03-21
for i := 1; i < 5; i++ {
fmt.Printf("%d: %s\n", i, map1[i])
}
fmt.Printf("%d: %s\n", i, map1[i])
}
2018-03-21