当前位置:网站首页>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代码调试:
控制台可正常打印结果
边栏推荐
- 学习笔记3--规划控制中的机器学习基本思想
- Docker安装MySQL
- Leetcode 1252. Number of odd value cells
- A curated list of awesome Qt and QML
- 梦想CMS 前台搜索SQL注入
- A fastandrobust convolutionalneuralnetwork-based defect detection model inproductqualitycontrol-閱讀筆記
- LOJ 2324 - "Tsinghua training 2017" small y and binary tree
- function/symbol ‘pango_ context_ set_ round_ glyph_ positions‘ not found in library ‘libpango-1.0. so. 0‘x
- Choice is more important than effort
- Region 性能调优
猜你喜欢

Docker install MySQL

03-1. Inline function, auto keyword, typeID, nullptr

TCP拥塞控制详解 | 7. 超越TCP

Docker安装MySQL

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

Learning note 3 -- basic idea of machine learning in planning control

Round table record: fireside dialogue -- how to realize innovation in Web3

Download of common getshell tools

cv02-roge矩阵,旋转向量 ,角度

Total number of blocking and waiting in jconsole thread panel (RPM)
随机推荐
搭建OpenStack-M版的Cinder所碰到过的状况
What do you look at after climbing the wall? The most popular foreign website - website navigation over the wall
A curated list of awesome Qt and QML
mysql show processlist 详解
565. Array nesting: regular simulation questions
学习笔记3--规划控制中的机器学习基本思想
Leetcode 1310. Subarray XOR query
CodeForces - 587E(线性基+线段树+差分)
解决邮件客户端QQ Mail及Thunderbird无法登入Outlook的问题
Docker install MySQL
Kunlunbase online meetup is waiting for you~
[multithreading] detailed explanation of JUC (callable interface, renntrantlock, semaphore, countdownlatch), thread safe set interview questions
【无标题】cv 学习1转换
Tier defect detection using full revolutionary network
Limit query of MySQL optimization series
02-3、指针和引用的区别
公网连接MySQL实例的解决方案
Introduction of database lock, shared with InnoDB, exclusive lock
Property analysis of rotate matrix (forwarding)
《MySQL DBA封神打怪之路》专栏学习大纲