惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
N
News | PayPal Newsroom
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
V
V2EX - 技术
S
Secure Thoughts
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
S
Securelist
S
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
V
Vulnerabilities – Threatpost
Security Latest
Security Latest
Recent Commits to openclaw:main
Recent Commits to openclaw:main
G
GRAHAM CLULEY
H
Hacker News: Front Page
Microsoft Azure Blog
Microsoft Azure Blog
I
Intezer
Google Online Security Blog
Google Online Security Blog
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
T
The Exploit Database - CXSecurity.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Webroot Blog
Webroot Blog
Jina AI
Jina AI
Engineering at Meta
Engineering at Meta
P
Proofpoint News Feed
The Cloudflare Blog
I
InfoQ
L
LangChain Blog
U
Unit 42
P
Proofpoint News Feed
S
Schneier on Security
S
Security Affairs
Y
Y Combinator Blog
T
Tenable Blog
N
News and Events Feed by Topic
MyScale Blog
MyScale Blog
量子位
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
博客园 - 聂微东
D
Darknet – Hacking Tools, Hacker News & Cyber Security
GbyAI
GbyAI
AWS News Blog
AWS News Blog

二叉树的博客

通用docker容器镜像打包应用的流程 kubevirt初体验 魔改dockur制作可迁移的Windows镜像(单文件) 通过dockur制作可迁移的Windows镜像(双文件) 通过ProxmoxVE制作kubevirt可用的Windows镜像 基于docker的在线IDE制作(支持浏览器直接访问) k8s日常问题排障 机房本地服务器自建Gitea并使用 nvidia-smi被自动升级无法与GPU通信了怎么办 conda使用GPU时的一些陷阱 给机房的LXD容器配置跳板机进行连接 在Pycharm上连接远程虚拟环境进行使用 给机房的Ubuntu22.04安装LXD共享GPU资源 给机房的Ubuntu22.04的Linux进行内穿映射端口
jetbrains家的goland项目可用但老爆红
二叉树上的我 · 2024-07-14 · via 二叉树的博客

问题

目前新的go项目默认都是go module模式,由于我需要使用私有仓库的package,清除了mod的缓存后Goland就识别不到我后续在命令行下执行

下载的依赖了。

goland爆红是因为没有在当前项目的vendor下找到这个玩意。(或根本没找到vendor目录)

解决

在项目根目录下执行以下命令:

这会在当前项目目录下面建立一个vendor目录,用于存放当前项目的package。

然后goland会自动识别到这个目录,就不会再爆红了。

但由于上传Github是不需要上传这部分依赖

需要项目根目录的

文件内添加一行

后在命令行执行

1
2
git add .gitignore
git commit -m "Add vendor to .gitignore"

然后执行

1
2
git rm -r --cached vendor
git commit -m "Remove vendor directory from version control"

进行测试

然后后续应该就不会上传vendor文件夹了

后言

goland的爆红问题,上面只是一个可能的原因和解决方式,不保证该方式通用。