go - 使用golang + vscode报错如何修复

标签 go visual-studio-code

enter image description here我想用vscode打golang, 所以我设置了两者,然后我在 vscode 中添加了 go 插件, 但它显示这些错误,我不知道如何解决。 有知道的吗?

Error

plugins

setting.json

go env

最佳答案

最后,我找到了解决方案。 可以在可视化代码中打开用户的settings.json文件,然后

set "go.buildOnSave": true,
set "go.lintOnSave": true,
set "go.vetOnsave":false

希望对你有帮助

关于go - 使用golang + vscode报错如何修复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50106026/

相关文章:

javascript - 在使用 .script 时在 visual studio 代码中使用 javascript intellisense

visual-studio-code - 如何在 vscode 中删除或停止自动生成 debug.log 文件?

vue.js - 如何告诉 VScode 将文件类型 A 格式化为文件类型 B,同时保留语法高亮显示?

Go Profiler (pprof) 时间差异

php - 从 PHP 到 Golang 的 aes-256-gcm 解密

go - 由于缺少包含路径,无法构建使用 Swig 构建的 go 模块

golang 将 big.Float 转换为 big.Int

Golang func main() 在 main 以外的包中?

visual-studio-code - 分机是否可以要求其他分机并调用它们的功能?

javascript - VS 代码 - 请求文本文档/定义失败