協程通訊:認識channel

有一個函數,作累加計算,如:html func sum(max int) { result := 0 //從1累加到max for i := 1; i <= max; i++ { result = result + i } //最後打印結果 fmt.
相關文章
相關標籤/搜索