点击运行
package main import ( "fmt" ) func hello() { fmt.Println("Hello Goroutine!") } func main() { go hello() fmt.Println("main function") }
运行结果 :
正在执行...