dongmei8209 2013-10-29 05:02
浏览 66

Revel框架和Go代码完成

is is possible to use Revel framework with Go code completion support. As far as i know the gocode utility requires the code to be compiled into a library into a pkg subfolder in order to function, but the framework does compilation on the fly.

I am kind of lost on the topic. Would the proper way be calling the go install for relevant subpackages? That seems to work but it is not the most elegant way of doing this from my perspective.

Hope that someone can point me in right direction.

EDIT: the problem is focused only on sources that I write as part of my Revel application. Downloaded packages have autocompletion as expected

EDIT2: This is the best solution I have found so far - executing go get command on your project's app/tmp subfolder. So if your project is called my_project then you would call something like go get my_project/revel/app/tmp Because this folder contains the main function for the project, it will pull all the dependencies and build them into packages. If the tmp folder does not exist you have to do revel run on your project and open your web app so it gets created on the fly. Hope this helps at least a bit. I am still open for a better alternative :)

  • 写回答

2条回答 默认 最新

  • douzhanrun0497 2013-11-12 18:28
    关注

    You revel application needs to reside inside of your $GOPATH/src folder and then code completion will work for your web app.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看