02. Go 命令

# 运行 go 文件
go run hello/hello.go

# 指定生成文件的名字
go build -o bin/hahaha.exe github.com/hello

# 将build后文件保存到 GOPATH 目录下 bin 文件下
go install github.com/hello

# 单元测试或压力测试
go test

# 查看 go 相关的环境变量
go env

# 格式化源代码
go fmt

猜你喜欢

转载自www.cnblogs.com/liudianer/p/12378640.html