zoukankan      html  css  js  c++  java
  • Gin does not contain package github.com/gin-gonic/gin/json

    Gin中使用yaag生成api文档时,在引用同步时,抛出如下报错:

    go mod tidy 
    go: finding module for package gopkg.in/gin-gonic/gin.v1
    go: finding module for package github.com/betacraft/yaag/gin/v1
    go: finding module for package github.com/betacraft/yaag/yaag
    go: found github.com/betacraft/yaag/gin/v1 in github.com/betacraft/yaag v1.0.0
    go: found github.com/betacraft/yaag/yaag in github.com/betacraft/yaag v1.0.0
    go: found gopkg.in/gin-gonic/gin.v1 in gopkg.in/gin-gonic/gin.v1 v1.3.0
    go: finding module for package github.com/gin-gonic/gin/json
    dbm/apps/dbm/api imports
            gopkg.in/gin-gonic/gin.v1 imports
            github.com/gin-gonic/gin/json: module github.com/gin-gonic/gin@latest found (v1.7.4), but does not contain package github.com/gin-gonic/gin/json
    

    大意说使用的gin的最新版1.7.4,但是该版本没有包含github.com/gin-gonic/gin/json,所以换成低版本,这里换的1.3.0

    C:Userssunpengfei.SCgosrcdbm>go get github.com/gin-gonic/gin@v1.3.0
    go: downloading github.com/gin-gonic/gin v1.3.0
    go: downloading gopkg.in/go-playground/validator.v8 v8.18.2
    go get: downgraded github.com/gin-gonic/gin v1.7.4 => v1.3.0
    go get: downgraded github.com/swaggo/gin-swagger v1.3.2 => v1.1.0
    
    >go mod tidy
    go: downloading github.com/swaggo/gin-swagger v1.1.0
    go: downloading gopkg.in/go-playground/assert.v1 v1.2.1
    go: finding module for package gopkg.in/gin-gonic/gin.v1
    go: finding module for package github.com/betacraft/yaag/gin/v1
    go: finding module for package github.com/betacraft/yaag/yaag
    go: found github.com/betacraft/yaag/gin/v1 in github.com/betacraft/yaag v1.0.0
    go: found github.com/betacraft/yaag/yaag in github.com/betacraft/yaag v1.0.0
    go: found gopkg.in/gin-gonic/gin.v1 in gopkg.in/gin-gonic/gin.v1 v1.3.0
    
    来啊,造作啊
  • 相关阅读:
    HTTPS之acme.sh申请证书
    GoAccess日志分析工具
    KVM之CPU虚拟化
    自动化运维之PSSH
    Hadoop+HBase 集群搭建
    SSH + Google Authenticator 安全加固
    查看数据的类型(python)
    在word中,替换多个词语。正则表达式中 [] {} 是可以连用的(python)
    方差分析的前提,与检验,以及球形检验
    清屏处理(汇编)
  • 原文地址:https://www.cnblogs.com/linga/p/15507356.html
Copyright © 2011-2022 走看看