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

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难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度