-
Notifications
You must be signed in to change notification settings - Fork 0
Home
niannings edited this page Sep 18, 2019
·
2 revisions
- 下载Go下载地址
- 初始化
mkdir goland & cd goland
touch test.go & code hello.go
- 编写第一个go程序 hello world
// hello.go
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
- 运行
go run hello.go
# hello world
- 构建应用程序
go build
# 接下来运行
./goland
# hello world