一.解压版Go语言安装包中自带工具
在%GOROOT%/bin中有三个工具
在命令行中通过
go help
查看go参数如下 ``` Usage:go command [arguments]
The commands are:
build compile packages and dependencies
clean remove object files and cached files
doc show documentation for package or symbol
env print Go environment information
bug start a bug report
fix update packages to use new APIs
fmt gofmt (reformat) package sources
generate generate Go files by processing source
get download and install packages and dependencies
install compile and install packages and dependencies
list list packages
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet report likely mistakes in packages
```
三.常用参数解释
go version
查看Go语言版本go env
查看Go语言详细环境go list
查看Go语言文件目录go build
把源码文件构建成系统可执行文件go clean
清空生成的可执行文件go vet
静态解析文件,检查是否有语法错误等go get
从远程下载第三方Go语言库go bug
提交buggo test
测试(在后面章节中讲解)go run
运行文件