gin-contrib / cors

Official CORS gin's middleware
https://gin-gonic.github.io/gin/
MIT License
1.79k stars 186 forks source link

gin.v1 instead of gin #21

Closed car12o closed 7 years ago

car12o commented 7 years ago

In this new update you change the gin framework version "github.com/gin-gonic/gin" instead of "gopkg.in/gin-gonic/gin.v1"

So I'm getting this error: cannot use cors.Default() (type "github.com/gin-gonic/gin".HandlerFunc) as type "gopkg.in/gin-gonic/gin.v1".HandlerFunc in argument to server.router.Use

Is this an issue or you change it in purpose ?

tboerger commented 7 years ago

This is a change on purpose, as most people are using anyway some dependency manager like glide we decided to use the plain github.com links to avoid other issues we had with gopkg.in

jwcoates commented 7 years ago

I also have this issue. Does that mean that all my imports of "gopkg.in/gin-gonic/gin.v1" should change to "github.com/gin-gonic/gin" ? What will I be losing/gaining in this case ?

appleboy commented 7 years ago

@jwcoates Yes. see https://github.com/gin-gonic/gin/issues/828