摘要:
package main import ( "fmt" "sort" ) type data struct { Key string val int } func main() { m := make(map[string]int) m["aone"] = 1 m["tree"] = 3 m["bt 阅读全文
摘要:
package main import "fmt" func main() { ch := make(chan int, 2) ch <- 1 ch <- 2 close(ch) for i := 0; i < cap(ch)+1; i++ { // 从已关闭的通道中获取数据,去除的数据放在data 阅读全文