一.解压版Go语言安装包中自带工具
在%GOROOT%/bin中有三个工具
在命令行中通过
go help查看go参数如下 ``` Usage:go command [arguments]
The commands are:
build compile packages and dependenciesclean remove object files and cached filesdoc show documentation for package or symbolenv print Go environment informationbug start a bug reportfix update packages to use new APIsfmt gofmt (reformat) package sourcesgenerate generate Go files by processing sourceget download and install packages and dependenciesinstall compile and install packages and dependencieslist list packagesrun compile and run Go programtest test packagestool run specified go toolversion print Go versionvet 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运行文件
