当前位置:网站首页>windows10:vscode下go语言的适配
windows10:vscode下go语言的适配
2022-07-17 14:55:00 【[虚幻私塾】】
优质资源分享
| 学习路线指引(点击解锁) | 知识定位 | 人群定位 |
|---|---|---|
| 🧡 Python实战微信订餐小程序 🧡 | 进阶级 | 本课程是python flask+微信小程序的完美结合,从项目搭建到腾讯云部署上线,打造一个全栈订餐系统。 |
| Python量化交易实战 | 入门级 | 手把手带你打造一个易扩展、更安全、效率更高的量化交易系统 |
ps:本篇依赖golang的sdk已经安装完成:
url:https://blog.csdn.net/mrwhite2020/p/16475731.html
一、下载vscode,选择windows最新版本
https://code.visualstudio.com/Download
默认按照user版本的64位机器选择:system installer和user installer的区别就在用于为所有用户/单用户安装。
二、安装vscode
默认选择对应的路径进行安装
ps:最好将以下两个选项勾选,以便之后使用起来比较方便,可以在右键菜单中增加vscode直接打开文件或文件夹的选项
添加path到环境变量默认会选择,勾选时不要去掉。
三、golang语言适配
1.选择打开文件夹并选择go脚本的目录
2.安装go扩展包
新建go脚本后,右下角提示是否安装go扩展,点击安装
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-GQ2Qqm4i-1658032894294)()]
3.安装go语言插件
(1)点击运行和调试后,右下角出现需要安装go响应插件的提示:
安装插件可以自动提示变量和函数,且可以正确运行代码
(2)点击install插件时候:发现如下的问题
(3)此时在cmd设置go的环境变量参数:
go env -w GO111MODULE=auto
此时安装依然失败:
(4)修改go环境变量的镜像设置:
go env -w GOPROXY=https://goproxy.io,direct
此时会发现如下的错误:
Error: 无法解析不存在的文件 ‘d:\Go_WorkSpace\pkg\mod\go.mod’
(5)此时在GOPATH路径下执行以下命令初始化go-mod
go mod init
且安装依赖git来完成插件的安装,确保机器已经安装了git
(6)点击右下角的Analysis Tools Missing工具安装后:可以查看Go哪些插件没有安装成功
四、测试go代码调试:
控制台可正常打印结果
边栏推荐
- Docker安装MySQL
- 【PostgreSQL 】PostgreSQL 15对distinct的优化
- Synchronized lock upgrade
- Introduction of database lock, shared with InnoDB, exclusive lock
- ZABBIX proxy server configuration
- SPI service discovery mechanism
- Cv02 Roge matrix, rotation vector, angle
- TCP congestion control details | 7 Surpass TCP
- Deep learning for generic object detection: a survey
- Hot discussion: my husband is 34 years old this year and wants to read a doctoral degree. What should I do in the future to do scientific research?
猜你喜欢

synchronized锁升级

学习笔记3--规划控制中的机器学习基本思想

Transport layer -------- TCP (I)

Wechat applet cloud development 1 - Database

Leetcode 1328. Destroy palindrome string (yes, solved)
![[PostgreSQL] PostgreSQL 15 optimizes distinct](/img/7c/89d05171902dd88bd2b5c352c3614f.png)
[PostgreSQL] PostgreSQL 15 optimizes distinct

要想组建敏捷团队,这些方法不可少

To build agile teams, these methods are indispensable

【嵌入式单元测试】C语言单元测试框架搭建

【PostgreSQL 】PostgreSQL 15对distinct的优化
随机推荐
Un modèle de détection par défaut basé sur le réseau neuronal évolutif rapide dans le contrôle de la qualité des produits - lire les notes
The difference between CPU load and CPU utilization
Hello JSON Schema
机器人开发--常用仿真软件工具
[binomial tree] the power of the button cattle customers must brush questions
玩转CANN目标检测与识别一站式方案
Redis分布式缓存-Redis集群
02-2. Default parameters, function overloading, reference, implicit type conversion, about error reporting
function/symbol ‘pango_context_set_round_glyph_positions‘ not found in library ‘libpango-1.0.so.0‘x
From prediction to decision-making, Chapter 9 Yunji datacanvas launched the ylearn causal learning open source project
Keras deep learning practice (14) -- r-cnn target detection from scratch
《MySQL DBA封神打怪之路》专栏学习大纲
Opencv draw a black rectangle and write the serial number
设置cmd命令提示符窗口的界面语言为英文
LeetCode 745. Prefix and suffix search
Sword finger offer II 041 Average value of sliding window
synchronized锁升级
LeetCode刷题——查找和最小的 K 对数字#373#Medium
SPI服务发现机制
Microservice online specification