When generating API documents using yaag
in gin, the following error is thrown during reference synchronization:
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
To the effect, the latest version of gin used is 1.7.4
, but this version does not contain github.com/gin-gonic/gin/json
, so it is replaced with a lower version. Here it is replaced with 1.3.0
,
C:\Users\sunpengfei.SC\go\src\dbm>go get github.com/gin-gonic/[email protected]
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
Similar Posts:
- [Solved] Go Language Error: cannot find module providing package github.com/
- [Solved] Go get Error: “The command you provide is v/v0.9.74.mod, it is not well formed.”
- [Solution] systemerror: the solution of parent module ” not loaded, cannot perform relative Import
- Project file is incomplete. Expected imports are missing [How to Solve]
- .net5 swagger Failed to load API definition. Fetch errorundefined /swagger/v1/swagger.json
- [Solved] Whitelabel page error when using Swagger2 in SpringBoot
- The error reported by golang when referring to a third-party package: no required module provides package [perfect solution]
- [Solved] Springboot Integrate Swagger2 3.0.0 Error: Failed to start bean ‘documentationPluginsBootstrapper’
- [How to Solve] Xcode:No such module SwiftyJSON
- An error is reported when swagger is used: failed to load API definition