zoukankan      html  css  js  c++  java
  • vscode 配置go开发环境

    vscode 配置go开发环境

    安装vscode插件

    Visual Studio Code的配置选项支持Go插件的设置,可以通过用户偏好设置或workspace设置进行配置。在菜单File->Preferences处可以找到。

    安装go模块

    vscode 死活下不下来,只能自己去下载了

    go get -u -v github.com/nsf/gocode
    go get -u -v github.com/rogpeppe/godef
    go get -u -v github.com/golang/lint/golint
    go get -u -v github.com/lukehoban/go-find-references
    go get -u -v github.com/lukehoban/go-outline
    go get -u -v sourcegraph.com/sqs/goreturns
    go get -u -v golang.org/x/tools/cmd/gorename
    go get -u -v github.com/tpng/gopkgs
    go get -u -v github.com/newhook/go-symbols
    

    调试工具dlv debug下载

    https://github.com/go-delve/delve

    进入到gopath中,自己进行安装go install

    setting.json

    打开工作区的json文件,将下列内容复制进去

    {
            "http.proxy": "http://127.0.0.1:7890",
            "go.useLanguageServer": true,
            "go.autocompleteUnimportedPackages": true,   
            "timeline.excludeSources": [],
            "go.inferGopath": true,
            "go.gotoSymbol.includeImports": true,
            "go.useCodeSnippetsOnFunctionSuggest": true,
            "go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
            "go.docsTool": "gogetdoc",
        
            "[go]": {
                "editor.snippetSuggestions": "none",
                "editor.formatOnSave": true,
                "editor.codeActionsOnSave": {
                    "source.organizeImports": true
                }
            },
            
            
            "files.eol": "
    ", // formatting only supports LF line endings
            "emmet.excludeLanguages": [
            
                "markdown"
            ],
            "go.addTags": {
            
            }
        }
    
  • 相关阅读:
    java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0
    CentOS7 firewalld 使用
    服务器设置主机名以及服务器间ssh连接
    httpclient处理返回数据
    httpclient如何获取请求参数
    httpclient请求转发实战
    Java自带的md5、sha和base64加密怎么用
    mongodb分页Spring-data-mongodb
    has been loaded by xml or sqlprovider
    052(十)
  • 原文地址:https://www.cnblogs.com/tomyyyyy/p/14105724.html
Copyright © 2011-2022 走看看