美文网首页
golang、go mod环境变量配置、goland永久激活

golang、go mod环境变量配置、goland永久激活

作者: 码农笔录 | 来源:发表于2019-11-30 10:27 被阅读0次

    原文链接 https://www.aiprose.com/blog/112
    注:激活方法仅限学习使用,切勿从事商业活动

    1.下载sdk

    首先你的下载golang的sdk,写文章的时候最下版本是1.13,网速可以的去官网下载,无法下载的,提供两个地址csdn下载服务器下载

    下载完成后解压到自己的目录里,切记不要有汉字的目录,专业修养。

    然后配置环境变量 GOROOT、GOPATH、GOPROXY、GO111MODULE

    最后在path里增加 %GOROOT%\bin

    GOROOT    gosdk解压目录
    GOPATH    存放代码和依赖库的地址,需要新建
    GO111MODULE    auto 自动   on 使用mod       off 不使用mod
    GOPROXY    https://goproxy.io或者 https://mirrors.aliyun.com/goproxy/ 
                  下载依赖代理,速度快
    
    image

    2.安装goland

    第一步:下载地址,安装没啥,不过最好换一下安装路径。打开后选择试用30天,新进去修改配置,才能永久激活

    第二步:下载激活jar包,1.3MB左右 点击下载,下载完成后复制到goland安装目录的bin下,主要是怕被误删除,切记不要出现汉字目录。

    第三步:修改配置,增加-javaagent:你的目录\jetbrains-agent.jar,然后重启goland

    image

    第四步:手动激活,输入下面激活码就可以永久激活了

    JQE11SV0BR-eyJsaWNlbnNlSWQiOiJKUUUxMVNWMEJSIiwibGljZW5zZWVOYW1lIjoicGlnNiIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiIiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwiZmFsbGJhY2tEYXRlIjoiMjA4OS0wNy0wNyIsInBhaWRVcFRvIjoiMjA4OS0wNy0wNyJ9LHsiY29kZSI6IkFDIiwiZmFsbGJhY2tEYXRlIjoiMjA4OS0wNy0wNyIsInBhaWRVcFRvIjoiMjA4OS0wNy0wNyJ9LHsiY29kZSI6IkRQTiIsImZhbGxiYWN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ZqV/g==
    
    image

    3.使用go mod

    1. go mod init<项目模块名称>初始化模块,会在项目根目录下生成 go.mod 文件。

    2. go mod tidy 根据 go.mod 文件来处理依赖关系.

    3. go mod download 下载依赖

    最好是在goland中配置一下代理地址

    image

    关注

    如果有问题,请在下方评论,或者加群讨论 189663710

    关注下方微信公众号,可以及时获取到各种技术的干货哦,如果你有想推荐的帖子,也可以联系我们的。

    image

    相关文章

      网友评论

          本文标题:golang、go mod环境变量配置、goland永久激活

          本文链接:https://www.haomeiwen.com/subject/qtxowctx.html