如何为GoClipse设置GoCode?

时间:2016-05-19 14:32:57

标签: eclipse go goclipse

阅读https://github.com/nsf/gocode上的指南后,我尝试了go get -u -ldflags -H=windowsgui github.com/nsf/gocode命令。这个命令后我没有得到任何回复。

enter image description here

我还发现GoClipse中有一个地方可以让我输入GoCode的路径。所以,我想也许我的Windows PC中已经有了GoCode,但它的位置是什么? enter image description here

3 个答案:

答案 0 :(得分:4)

views/blog除非出现错误,否则不会输出任何内容。

使用go工具安装的任何内容的位置为go get$GOPATH/bin取决于您的环境。

如果您不确定它在哪里,请运行$GOPATH,它将打印Go使用的环境变量列表,包括GOPATH。

答案 1 :(得分:1)

导航至窗口->首选项->转到->工具 最简单快捷的方法是点击 gocode,guru和godef 下的下载按钮。 Eclipse将自动为您完成其余的工作。

enter image description here

答案 2 :(得分:0)

只需转到命令行并输入:go env

导航到windows中的GOPATH目录,你会在下面找到bin文件夹,打开文件夹,你会看到安装了所有必需的exe文件,刚才在eclipse中提到过, 我的环境中的例子:

  • 检查GOPATH文件夹

enter image description here

  • 导航到GOPATH文件夹\ bin,并确保安装了所需的exe文件 enter image description here
  • 在eclipse中设置exe路径

enter image description here

  • 结果如下 enter image description here
相关问题