编写hello.go如下
1 package main
2
3 import "fmt"
4
5 func main(){
6 fmt.Println("hello world")
7
8 }
运行hello.go
go run hello.go
1 package main
2
3 import "fmt"
4
5 func main(){
6 fmt.Println("hello world")
7
8 }
go run hello.go