Coin says to OwO
/go@mmis_js_bot package main import ( "fmt" ) func main() { // 建立頻道,這樣就能在多個行程中溝通。 ch := make(chan bool) // 建立新行程。 go func(){ // 向頻道發送資料。 ch <- "Test" }() // 除非頻道有收到資料,否則卡在這裡。 test := <-ch // 輸出。 fmt.Println(test) }