无法安装 gin-gonic:c.engine.AppEngine 未定义(类型 *Engine 没有字段或方法 AppEngine)

Ind*_*dra 6 go go-gin

我无法为我的 golang 项目安装 gin-gonic 。我尝试重新安装 go,重置 bash 文件,删除并重新创建项目文件夹,并在 google 上搜索错误作为关键字,但什么也没找到

这是我的终端消息:

$ go get -u github.com/gin-gonic/gin
# github.com/gin-gonic/gin
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin@v1.7.5\context.go:735:13: c.engine.AppEngine undefined (type *Engine has no field or method AppEngine)
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin@v1.7.5\gin.go:154:3: unknown field 'UseRawPath' in struct literal of type Engine
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin@v1.7.5\gin.go:156:3: unknown field 'UnescapePathValues' in struct literal of type Engine
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin@v1.7.5\gin.go:508:11: engine.UseRawPath undefined (type *Engine has no field or method UseRawPath)
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin@v1.7.5\gin.go:510:20: engine.UnescapePathValues undefined (type *Engine has no field or method UnescapePathValues)
Run Code Online (Sandbox Code Playgroud)

小智 3

我降级到 v1.7.2,一切正常。看看https://github.com/gin-gonic/gin/issues/2948