加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

golang的 IntelliJ Idea插件 google-go-lang-idea-plugin 编译方

发布时间:2020-12-16 18:58:17 所属栏目:大数据 来源:网络整理
导读: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 fol

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 FilesJetBrainsIntellik 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

然后再设置一下环境:


分别指定:

  1. jdk的目录(需要去java首页下载)
  2. idea的安装目录
  3. go语言的安装目录(需要去golang的首页下载)

如下图:


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


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

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

Build -> Prepare for Deployment

会在项目目录生成一个jar文件。

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

安装这个插件的方法是:

File》Settings》Plugins》Install plugin from disk

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读