dongweihuan8832
dongweihuan8832
2017-10-10 04:34
浏览 124
已采纳

Intellij Go导入自动完成

Anyway to have Intellij autocomplete import statements for github projects?

Like if I want to import github.com/gorilla/mux but I haven't run go get ... yet, is there anyway to have that be autocompleted?

图片转代码服务由CSDN问答提供 功能建议

是否为github项目提供Intellij自动完成导入语句?

例如 我想导入 github.com/gorilla/mux ,但是我还没有运行 go get ... ,仍然可以自动完成吗?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanmao2650
    duanmao2650 2017-10-10 04:47
    已采纳

    but I haven't run go get ... yet, is there anyway to have that be autocompleted?

    No: Gogland should add the import automatically on save, but only if the package was installed first (present in a pkg folder of your workspace, for external packages)

    And even in that case, Gogland will not automatically import ambiguous packages (meaning if you have two rand packages, it will ask you which one to use, the crypto/rand or the math/rand). That should not be the case here.

    点赞 评论

相关推荐