0

www;yaxin121;com13036075017加盟

 1 month ago
source link: https://studygolang.com/articles/36559
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

www;yaxin121;com13036075017加盟

rvxefxsd · 7天之前 · 67 次点击 · 预计阅读时间 1 分钟 · 大约8小时之前 开始浏览    

google-go-lang-idea-plugin 插件虽然好,但是官方的编译版总是更新很慢,所以需要自己编译,问了老外才知道怎么编译,编译方法如下:

I opened this project in IDEA Community 13 (or whatever the latest EAP is), then choose the SDK as the program folder (C:\Program Files\JetBrains\Intellik IDEA Community Edition) and then went to Build -> Prepare for Deployment. It'll save a jar file in the location that popups up and then you can install that in an IDEA IDE.

具体的过程,我截图如下:

intellijIDEA的首页放的是稳定版,而我们要找到测试版,直接点如下链接就能下载测试版:

http://www.jetbrains.com/idea/nextversion/index.html 如下图:

 下载安装完成后,点击help菜单更新,如下图:

 然后下载 idea的 golang插件源码:

https://github.com/mtoader/google-go-lang-idea-plugin 如下图:

 解压到任意目录,比如c:\idea_golang

然后用idea打开这个目录,即点击菜单 File》Open

然后再设置一下环境:

 分别指定:

jdk的目录(需要去java首页下载) idea的安装目录 go语言的安装目录(需要去golang的首页下载) 如下图:

 设置完SDKs之后,还要在Modules页面重新指定一下idea的安装目录,看图:

 最后可以Ctrl+Shift+F9编译试试,如果弹出的信息都是警告(warning)信息而没有错误信息(error),那就说明没问题了。

接下来就可以像老外说的那样,点击菜单:

Build -> Prepare for Deployment 会在项目目录生成一个jar文件。

这个就是编译好的插件了。

安装这个插件的方法是:

File》Settings》Plugins》Install plugin from disk


有疑问加站长微信联系(非本文作者))

280

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK