douzou0073 2019-07-04 17:07
浏览 404
已采纳

go.mod在修订版v2.0.0上具有后v2模块路径

I have a rest api I built in Go with gin that has been working for months now on my local machine running 1.12.1. I decided it was going to a docker deploy so I started building with 1.12.6 when I started see errors during module retrieval. I went back to my local machine, ran running 1.12.1 and ran go clean -modcache, now the error is there as well. I've tried regenerating multiple times even editing the go.sum file to different versions of gofight but I'm lost and run out of ideas.

The output w/error:

go: github.com/appleboy/gofight@v2.0.0+incompatible: go.mod has post-v2 module path "github.com/appleboy/gofight/v2" at revision v2.0.0
go: error loading module requirements

go.mod

module go-hybrid-alert

go 1.12

require (
    cloud.google.com/go v0.37.0
    firebase.google.com/go v3.6.0+incompatible
    github.com/Luzifer/go-openssl v2.0.0+incompatible
    github.com/PuerkitoBio/goquery v1.5.0
    github.com/antchfx/htmlquery v1.0.0 // indirect
    github.com/antchfx/xmlquery v1.0.0 // indirect
    github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e // indirect
    github.com/appleboy/gin-jwt v0.0.0-20190216100112-ca1084e5d5a2
    github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 // indirect
    github.com/gin-gonic/gin v1.3.0
    github.com/go-redis/redis v6.15.2+incompatible
    github.com/gobwas/glob v0.2.3 // indirect
    github.com/gocolly/colly v1.2.0
    github.com/kennygrant/sanitize v1.2.4 // indirect
    github.com/kisielk/godepgraph v0.0.0-20181003180210-9a9a3d47fba3 // indirect
    github.com/levigross/grequests v0.0.0-20190130132859-37c80f76a0da // indirect
    github.com/mattn/go-isatty v0.0.7 // indirect
    github.com/mitchellh/mapstructure v1.1.2
    github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect
    github.com/temoto/robotstxt v0.0.0-20180810133444-97ee4a9ee6ea // indirect
    github.com/ugorji/go/codec v0.0.0-20190316083543-95c34d148dff // indirect
    golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a
    golang.org/x/net v0.0.0-20190313220215-9f648a60d977
    google.golang.org/api v0.2.0
    gopkg.in/dgrijalva/jwt-go.v3 v3.2.0 // indirect
    gopkg.in/go-playground/validator.v8 v8.18.2 // indirect
)

go.sum (the line for the module in question, posting the whole thing exceeds SO post length)

github.com/appleboy/gofight v2.0.0+incompatible/go.mod h1:H/tvof1oZHnZdlBd+AeODZGkk1C+D2na0NXr0iXuZHA=

I've also tried adjusting the go 1.12 statement in go.mod for the specific subversions I'm attempting to build with but that had no effect.

What does this error mean? How can I fix it?

  • 写回答

1条回答

  • dtmu88600 2019-07-04 17:40
    关注

    A number of packages were outdated, the main fix was to run the new install command for gin-jwt, go get github.com/appleboy/gin-jwt/v2

    Ultimately though I just nuked my go.mod and go.sum and did a fresh sync in Goland IDE. Everything is working on 1.12+

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100