首页  >  文章  >  开发工具  >  Golang 能用 vscode 开发吗?

Golang 能用 vscode 开发吗?

Guanhui
Guanhui原创
2020-06-10 13:22:003559浏览

Golang 能用 vscode 开发吗?

Golang 能用 vscode 开发吗?

Golang能用vscode进行开发,使用方法:

首先打开vscode,并打开扩展;

微信截图_20200610131848.png

然后搜索Go,并点击install安装插件,如果已经安装了,会显示uninstall;

微信截图_20200610131552.png

最后配置编辑器,并将依赖库安装即可。

微信截图_20200610131610.png

修改为

{
 
    "go.buildOnSave": "workspace",
    "go.lintOnSave": "package",
    "go.vetOnSave": "package",
    "go.buildTags": "",
    "go.buildFlags": [],
    "go.lintFlags": [],
    "go.vetFlags": [],
    "go.coverOnSave": false,
    "go.useCodeSnippetsOnFunctionSuggest": false,
    "go.formatOnSave": true,
    "go.formatTool": "goreturns",
    "go.goroot": "D:/tool/go",
    "go.gopath": "E:/gowork",
    "go.gocodeAutoBuild": false,
    "files.autoSave":"onFocusChange",
    "launch": {
      "version": "0.2.0",
      "configurations": [
        {
          "name": "GoLaunch",
          "type": "go",
          "request": "launch",
          "mode": "debug",
          "remotePath": "",
          "port": 2345,
          "host": "127.0.0.1",
          "program": "${fileDirname}",
          "env": {
            "GOPATH":"E:/gowork"
          },
          "args": [],
          "showLog": true
        }
      ]
    }
  }  

推荐教程:《vscode入门教程

以上是Golang 能用 vscode 开发吗?的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn