一、1.6版本以后用go build出错
go: go.mod file not found in current directory or any parent directory; see 'go help modules'
解决办法
go env -w GO111MODULE=auto
二、Linux环境变量的配置
export PATH=/usr/local/go/bom:$PATH(go编译器安装路径) export GOROOT=/usr/local/go(go编译器安装路径) export GOPATH=/home/go/project/(go代码文件目录) export GOBIN=/home/go/project/bin(go代码文件bin目录)