英文:
Go get not working in Atom
问题
所以我在Windows 7上安装了Atom,并想在其中尝试Go语言。我安装了一个名为go-plus
的包,但它需要安装另外两个东西:
所以我点击了运行Go Get,但是我得到了这个错误:
我在Debian和Manjaro上尝试过,在运行Run Go Get之后它就可以正常工作。所以我想在我的cmd中运行go get -u ...
,它可以工作,但是当我打开Atom时,这两个消息仍然弹出。我该如何处理这个问题?
英文:
So I've installed Atom on Windows 7 and I wanted to try out Go language in that. I installed a package called go-plus
, but it needed 2 more things to install:
So I clicked Run Go Get, but I get this error:
I tried it on Debian and on Manjaro and after runing Run Go Get it just works. So I thought about running go get -u ...
in my cmd, it worked, but still when I open Atom those 2 messages pop out. How can I deal with it?
答案1
得分: 2
go get
命令会根据GOPATH
环境变量指定的路径,在你的Go工作区中下载并安装包。在Atom中能够下载工具之前,你必须首先设置GOPATH
。
你可以使用go env
命令来验证,也可以点击Atom底部的go-plus
图标查看Atom可见的GOPATH
值。
你的截图和评论表明GOPATH
中存在无效的文件夹值。最简单的方法是将其设置为单个绝对路径文件夹。你可以在这里阅读更多相关信息:
英文:
The go get
command downloads and installs packages in your go workspace, as denoted by the GOPATH
environment variable. You must set this first for Atom to be able to download utilities.
You may use the go env
command to verify, also you can click on the go-plus
icon at the bottom of Atom to see the GOPATH
value visible to Atom.
Your screenshots and comments indicate you have an invalid folder value in your GOPATH
. Easiest is to set it to a single, absolute folder. You can read more about it here:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论