go: GOPATH entry is relative; must be absolute path: "".

安装:vscode-go出现以下提示:

go: GOPATH entry is relative; must be absolute path: "".

go: GOPATH entry is relative; must be absolute path: "".
Run 'go help gopath' for usage.

查看GOPATH环境变量:

go: GOPATH entry is relative; must be absolute path: "".

配置也正确,难道是不能包含中文路径?

修改GOPATH如下:

go: GOPATH entry is relative; must be absolute path: "".

执行结果如下:

go: GOPATH entry is relative; must be absolute path: "".

还是照旧呀!

输入go version,执行结果如下:

go: GOPATH entry is relative; must be absolute path: "".

经排查:添加D:\gosms路径之后,GOPATH字符串后面多了一个;,去掉;,并重启,可解决。

go: GOPATH entry is relative; must be absolute path: "".

注意事项,要在如下窗口进行编辑:

go: GOPATH entry is relative; must be absolute path: "".

点击编辑文本:

go: GOPATH entry is relative; must be absolute path: "".

把路径修改成包含中文的,执行以下语句:

go get -v -u github.com/peterh/liner github.com/derekparker/delve/cmd/dlv

结果如下:

go: GOPATH entry is relative; must be absolute path: "".

是成功的,说明go get支持中文路径。

上一篇:终于又可以用WLW了.


下一篇:Lesson 3 Please send me a card