golang使用vscode做ide

新版本golang,1.14+ ,httpproxy

  • 安裝最新版本golang
    新版安裝後自動配置了gopath環境變量,舊版本需手動配置

  • 配置vscode http代理
    1. 獲取代理,l a n t e r n-設置-高級設置-HTTP(S)代理服務器:127.0.0.1:50619
    2. 配置到vscode,vscode-首選項-
                Http:Proxy    http://127.0.0.1:50619
                Http:Proxy Strict SSL     false
    或在setting.json中添加:

    "http.proxy": "http://127.0.0.1:50619",
    "http.proxyStrictSSL": false
    
  • 按vscode提示安裝go插件

    go.toolsGopath setting is not set. Using GOPATH C:\Users\fegnz\go 這個不去管它
    Installing 17 tools at C:\Users\fegnz\go\bin in module mode.
    gocode
    gopkgs
    go-outline
    go-symbols
    guru
    gorename
    gotests
    gomodifytags
    impl
    fillstruct
    goplay
    godoctor
    dlv
    gocode-gomod
    godef
    goreturns
    golint

    Installing github.com/mdempsky/gocode SUCCEEDED
    Installing github.com/mdempsky/gocode SUCCEEDED
    Installing github.com/uudashr/gopkgs/v2/cmd/gopkgs SUCCEEDED
    Installing github.com/uudashr/gopkgs/v2/cmd/gopkgs SUCCEEDED
    Installing github.com/ramya-rao-a/go-outline SUCCEEDED
    Installing github.com/ramya-rao-a/go-outline SUCCEEDED
    Installing github.com/acroca/go-symbols SUCCEEDED
    Installing github.com/acroca/go-symbols SUCCEEDED
    Installing golang.org/x/tools/cmd/guru SUCCEEDED
    Installing golang.org/x/tools/cmd/guru SUCCEEDED
    Installing golang.org/x/tools/cmd/gorename SUCCEEDED
    Installing golang.org/x/tools/cmd/gorename SUCCEEDED
    Installing github.com/cweill/gotests/… SUCCEEDED
    Installing github.com/cweill/gotests/… SUCCEEDED
    Installing github.com/fatih/gomodifytags SUCCEEDED
    Installing github.com/fatih/gomodifytags SUCCEEDED
    Installing github.com/josharian/impl SUCCEEDED
    Installing github.com/josharian/impl SUCCEEDED
    Installing github.com/davidrjenni/reftools/cmd/fillstruct SUCCEEDED
    Installing github.com/davidrjenni/reftools/cmd/fillstruct SUCCEEDED
    Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
    Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
    Installing github.com/godoctor/godoctor SUCCEEDED
    Installing github.com/godoctor/godoctor SUCCEEDED
    Installing github.com/go-delve/delve/cmd/dlv SUCCEEDED
    Installing github.com/go-delve/delve/cmd/dlv SUCCEEDED
    Installing github.com/stamblerre/gocode SUCCEEDED
    Installing github.com/stamblerre/gocode SUCCEEDED
    Installing github.com/rogpeppe/godef SUCCEEDED
    Installing github.com/rogpeppe/godef SUCCEEDED
    Installing github.com/sqs/goreturns SUCCEEDED
    Installing github.com/sqs/goreturns SUCCEEDED
    Installing golang.org/x/lint/golint SUCCEEDED

    All tools successfully installed. You are ready to Go 😃.
    Installing golang.org/x/lint/golint SUCCEEDED

    All tools successfully installed. You are ready to Go 😃.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章