How to link GOPATH to LiteIDE?

我只是一个虾纸丫 提交于 2019-12-03 12:34:37

Select the correct environment for you system from the drop-down:

For example, if you're on a Mac and used the package installer it would be "darwin64-local" on a 64 bit Mac.

Then click on the "Go" folder icon on the left of the drop-down.

Click "Add Directory..." and add a folder path that contains src, pkg, and bin folders. Essentially what you set GOPATH to.

Make sure you do not set GOROOT in .bashrc at all. You don't need to set GOROOT, really.

Follow the answer above, but then regarding the updated problems with the build path being incorrect:

If you "build" in Liteide then the executable gets put in the same file as your .go file.

But by clicking "install" in Liteide then the executable gets placed in the go workspace root bin folder as it should be.

You can still "run" the code from within Liteide if there is not the executable in the same folder as your .go file.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!