zoukankan      html  css  js  c++  java
  • window搭建go环境

    下载go的window安装包:
    软件下载地址:https://studygolang.com/dl
    手册地址:https://studygolang.com/pkgdoc

    windows安装,下一步下一步就好,
    然后就是配置GOPATH的环境(go的安装路径)和PATH的环境(go的安装路径下的bin路径)

    代理服务配置:

    $ go env -w GO111MODULE=on
    $ go env -w GOPROXY=https://goproxy.cn,direct
    

    打开vscode,然后搜索go的扩展,然后安装。

    Installing 15 tools at D:goin in module mode.
      go-outline
      go-symbols
      guru
      gorename
      gotests
      gomodifytags
      impl
      fillstruct
      goplay
      godoctor
      dlv
      gocode-gomod
      godef
      goreturns
      golint
    

    以上的安装扩展一般需要FQ的,或者自己手动github下载。以上使用七牛云的代理服务可以直接下载。

    Installing github.com/ramya-rao-a/go-outline (D:goingo-outline.exe) SUCCEEDED
    Installing github.com/acroca/go-symbols (D:goingo-symbols.exe) SUCCEEDED
    Installing golang.org/x/tools/cmd/guru (D:goinguru.exe) SUCCEEDED
    Installing golang.org/x/tools/cmd/gorename (D:goingorename.exe) SUCCEEDED
    Installing github.com/cweill/gotests/... (D:goingotests.exe) SUCCEEDED
    Installing github.com/fatih/gomodifytags (D:goingomodifytags.exe) SUCCEEDED
    Installing golang.org/x/tools/gopls (D:goingopls.exe) SUCCEEDED
    
    All tools successfully installed. You are ready to Go :).
    Installing github.com/josharian/impl (D:goinimpl.exe) SUCCEEDED
    Installing github.com/davidrjenni/reftools/cmd/fillstruct (D:goinfillstruct.exe) SUCCEEDED
    Installing github.com/haya14busa/goplay/cmd/goplay (D:goingoplay.exe) SUCCEEDED
    Installing github.com/godoctor/godoctor (D:goingodoctor.exe) SUCCEEDED
    Installing github.com/go-delve/delve/cmd/dlv (D:goindlv.exe) SUCCEEDED
    Installing github.com/stamblerre/gocode (D:goingocode-gomod.exe) SUCCEEDED
    Installing github.com/rogpeppe/godef (D:goingodef.exe) SUCCEEDED
    Installing github.com/sqs/goreturns (D:goingoreturns.exe) SUCCEEDED
    Installing golang.org/x/lint/golint (D:goingolint.exe) SUCCEEDED
    
    All tools successfully installed. You are ready to Go :).
    

    以上就配置好了go的扩展,开发时可以自动添加go的扩展包啦

  • 相关阅读:
    leetcode 2 Add Two Numbers
    leetcode1
    二叉树的最大高度和最大宽度
    插入排序
    eventEmitter学习
    用node.js做一个爬虫
    HTLM5 WebSocket权威指南
    (new Function("return " + json))();
    JS中的this变量的使用介绍
    node.js 模块加载原理
  • 原文地址:https://www.cnblogs.com/justsus/p/14067572.html
Copyright © 2011-2022 走看看