Reputation: 61
I can't install gin-gonic for my golang project. I tried reinstalling go, resetting the bash files, delete and recreate the project folder, and searched the error as keyword on google, but found nothing
Here are my terminal messages:
$ go get -u github.com/gin-gonic/gin
# github.com/gin-gonic/gin
..\..\..\..\go\pkg\mod\github.com\gin-gonic\[email protected]\context.go:735:13: c.engine.AppEngine undefined (type *Engine has no field or method AppEngine)
..\..\..\..\go\pkg\mod\github.com\gin-gonic\[email protected]\gin.go:154:3: unknown field 'UseRawPath' in struct literal of type Engine
..\..\..\..\go\pkg\mod\github.com\gin-gonic\[email protected]\gin.go:156:3: unknown field 'UnescapePathValues' in struct literal of type Engine
..\..\..\..\go\pkg\mod\github.com\gin-gonic\[email protected]\gin.go:508:11: engine.UseRawPath undefined (type *Engine has no field or method UseRawPath)
..\..\..\..\go\pkg\mod\github.com\gin-gonic\[email protected]\gin.go:510:20: engine.UnescapePathValues undefined (type *Engine has no field or method UnescapePathValues)
Upvotes: 6
Views: 1639
Reputation: 31
I downgraded to v1.7.2 and everything worked well. Take a look at https://github.com/gin-gonic/gin/issues/2948
Upvotes: 3
Reputation: 81
I had the same problem. but I resolve it with root on ubuntu. Similarly, It'd be good to execute with "run as administrator"
Upvotes: -1
Reputation: 1
I have the same problem when using [email protected], so I downgrade to [email protected], and it works well
Upvotes: 0