登录
首页 >  Golang >  Go问答

记录数据格式错误:github.com/lib//go.mod

来源:stackoverflow

时间:2024-02-24 23:42:20 229浏览 收藏

从现在开始,努力学习吧!本文《记录数据格式错误:github.com/lib//go.mod》主要讲解了等等相关知识点,我会在golang学习网中持续更新相关的系列文章,欢迎大家关注并积极留言建议。下面就先一起来看一下本篇正文内容吧,希望能帮到你!

问题内容

我正在尝试使用命令 go get gorm.io/driver/postgres 获取 go 包

但结果总是这样

go get: gorm.io/driver/postgres@none updating to
        gorm.io/driver/[email protected] requires
        github.com/jackc/pgx/[email protected] requires
        github.com/jackc/[email protected] requires
        github.com/jackc/[email protected] requires
        github.com/jackc/[email protected] requires
        github.com/jackc/pgx/[email protected] requires
        github.com/jackc/[email protected] requires
        github.com/lib/[email protected]: verifying go.mod: github.com/lib/[email protected]/go.mod: malformed record data

我已经清理了我的缓存,但仍然遇到相同的错误。我应该怎么办?谢谢


正确答案


您对 [https://github.com/lib/pq/tree/v1.0.0] 存在间接依赖,其中包含格式错误的 go mod 文件。其中没有提到 go 版本。最新版本是 v1.10.2。由于它是间接的,因此您的代码中无需执行任何操作,您可以使用直接依赖项 gorm.io/driver/postgres 的版本,该版本使用此 lib/pq/tree 库的更新版本,或者在 git 中针对 lib 提出问题/pq/tree

终于介绍完啦!小伙伴们,这篇关于《记录数据格式错误:github.com/lib//go.mod》的介绍应该让你收获多多了吧!欢迎大家收藏或分享给更多需要学习的朋友吧~golang学习网公众号也会发布Golang相关知识,快来关注吧!

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>