1

After installing the GoCode autocompletion daemon in GoClipse, it works for the more general imports (fmt and such), but not for more specific ones.

I do believe my GoClipse is properly set up, since it works with some imports already. The specific import I am trying to make it work for is "github.com/hyperledger/fabric/core/chaincode/shim".

There must be something I have to do to make those imports work, but I haven't figured it out yet. I can always code without autocompletion, but eh.

Does anyone know how to make it work? Thanks a bunch.

Note: I'd post images to illustrate my problem, but well: "You need at least 10 reputation to post images".

Edit : It also doesn't autocomplete local variables. Is it related? Or is it working as intended?

Screenshots:

enter image description here

enter image description here

enter image description here

4

1 回答 1

0

好吧,所以我挖掘并找到了解决问题的方法。我基本上需要在我的机器上本地安装导入。

这很容易用 go get 命令完成

例如,对于我遇到的具体问题,我希望导入“github.com/hyperledger/fabric/core/chaincode/shim”自动完成。我运行了命令

去获取“github.com/hyperledger/fabric/core/chaincode/shim”

重新启动 GoClipse,它运行良好。

希望它可以帮助别人。

于 2019-01-09T15:07:43.997 回答