初来go语言,配好的goroot,gopath,path 后开始写helloWord, HelloWord.go用cmd执行正常,然后用起来老伙计idea,go插件安装简单,在此不表。运行起HelloWord报如下bug:
WARNING: exec: "goconst": executable file not found in $PATH
WARNING: exec: "deadcode": executable file not found in $PATH
WARNING: exec: "dupl": executable file not found in $PATH
WARNING: exec: "gocyclo": executable file not found in $PATH
WARNING: exec: "ineffassign": executable file not found in $PATH
WARNING: exec: "dupl": executable file not found in $PATH
WARNING: exec: "deadcode": executable file not found in $PATH
WARNING: exec: "gotype": executable file not found in $PATH
随懵逼之,然后开始百度,百度上基本没有资料,少数一个试了试也没有解决。然后翻墙Google,方法如下:
Please run go get -u github.com/alecthomas/gometalinter
and then gometalinter -i -u
. Ensure that $GOPATH/bin
is in your PATH
.
解释一下:
1。cmd 运行 go get -u github.com/alecthomas/gometalinter
2。下载的gometalinter文件在你之前配置的gopath目录下(这个是我全局搜的,在此就行标注)。
3。cd到下载目录下,有个gometalinter.exe文件,执行 gometalinter -i -u
4最后需要保证 GOPATH/bin 在你配置的 path 环境变量之下。
希望能给不方便翻墙的朋友们一点帮助