6

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\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)
blackgreen
  • 34,072
  • 23
  • 111
  • 129
Indra
  • 61
  • 3

3 Answers3

3

I downgraded to v1.7.2 and everything worked well. Take a look at https://github.com/gin-gonic/gin/issues/2948

blackgreen
  • 34,072
  • 23
  • 111
  • 129
0

I have the same problem when using gin@v1.7.5, so I downgrade to gin@v1.7.4, and it works well

-1

I had the same problem. but I resolve it with root on ubuntu. Similarly, It'd be good to execute with "run as administrator"

Mingyu Choi
  • 71
  • 1
  • 7
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 23 '21 at 03:09