Go有关问题汇总

Go问题汇总记录学习Go中遇到的问题点滴1、Eclipse创建Go Project时异常GOROOT has not been set. This can

Go问题汇总
记录学习Go中遇到的问题点滴

1、Eclipse创建Go Project时异常

GOROOT has not been set. This can be done from the Go preference page.

出现该问题的原因是由于没有配置GORoot path引起的
在Eclipse中选择 window->Preferences 弹出的菜单中选择 GO,设置GOROOT PATH

2、import project go
右键-import-General-Existing Projects into Workspace 选择具体路径下项目导入。
导入后还无法正常使用。选择具体项目右键-Properties-Go Project Configuration
source [Add Folder] 选择src 确定。