Golang&Goland配置

栏目: IT技术 · 发布时间: 5年前

内容简介:File Watchers插件下载Tools -> File Watchers中,添加如下设置:进行如上设置后,就可以在导入不在缓存中的包时,点击 Sync packages of... 下载该包了:

Golang配置

环境配置

  1. 设置环境变量 GOPROXY ,以使用 go get 的:
export GOPROXY=https://goproxy.io

Goland配置

gofmt与goimports(GoLand 2019.1.3)

File Watchers插件下载

Tools -> File Watchers中,添加如下设置:

Golang&Goland配置

image.png

Go Modules 配置(GoLand 2019.1.3)

  1. Preferences -> Go -> Go Modules (vgo),勾选 Enable Go Modules (vgo) integration 以启用 Go Modules,并在 Proxy 输入框中输入 https://goproxy.io 。如图所示:

    Golang&Goland配置

    image.png

  2. Preferences -> Go -> GOPATH,勾选上 Index entire GOPATH 以索引整个 GOPATH,不然无法导入包。如图所示:

    Golang&Goland配置

    image.png

进行如上设置后,就可以在导入不在缓存中的包时,点击 Sync packages of... 下载该包了:


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Designing with Web Standards (2nd Edition)

Designing with Web Standards (2nd Edition)

Jeffrey Zeldman / Peachpit Press / 2006-07-06 / USD 44.99

Best-selling author, designer, and web standards evangelist Jeffrey Zeldman has updated his classic, industry-shaking guidebook. This new edition--now in full color--covers improvements in best prac......一起来看看 《Designing with Web Standards (2nd Edition)》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换