Closed pkopac closed 7 years ago
Merging #4 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #4 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 25 25
=====================================
Hits 25 25
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 841376c...549cda6. Read the comment docs.
@appleboy: added the correct build step to travis, too, so now it builds and should be compatible.
Why need Godeps? We use govendor
tool for develop branch of gin.
@appleboy: I don't know, therefore I don't remove it ;) It certainly doesn't hurt in the .gitignore
, but if you want, you can remove it anytime. Is this good to go?
Why need to update vendor folder?
You can try the following steps:
$ git clone https://github.com/gin-contrib/static.git
$ cd example/simple
$ govendor init
$ govendor fetch github.com/gin-contrib/static
$ govendor fetch github.com/gin-gonic/gin
$ go run example.go
It is working for me so I don't know this PR fix issue what you want?
@appleboy: why do I need to update dependencies? Because that's how it's meant to be working. You are not supposed to be committing other people's code in your repository.
I never said it breaks your example. It breaks any program that uses this library, though. Because of the committed dependencies that are duplicate towards the standard Go dependency system and break on compilation:
router.Use(static.Serve("/", static.LocalFile("./static", false)))
Error: (as mentioned in #1)
cannot use static.Serve("/", static.LocalFile("./static", false)) (type "github.com/gin-contrib/static/vendor/github.com/gin-gonic/gin".HandlerFunc) as type "github.com/gin-gonic/gin".HandlerFunc in argument to router.Use
Do you see the vendor
there? It's breaking it. The libraries shouldn't be fetched there. There should be only the config in the folder, nothing else.
@pkopac Please remove your vendor folder first and fetch again.
fetch static library in the project using govendor
tool:
$ govendor fetch github.com/gin-contrib/static
I can't see the github.com/gin-contrib/static/vendor
path in vendor folder. What is your vendor tool?
@appleboy, I am not using vendoring tools. I haven't even known about them up to now :)
I'm using the original go get ./...
in my builds. So no, I can't remove my vendor folder. There is none.
The problem is, you have committed the libraries inside your vendor folder, which makes it incompatible wiht standard go get ./...
See the libraries, which shouldn't be there: https://github.com/gin-contrib/static/tree/master/vendor
That's the path you can't see. That's it.
I removed the dependency on this library now, because I need the builds running.
@pkopac I got your point. I will remove vendor folder.
Godeps
was renamed tovendor
, but author forgot to change.gitignore
.gitignore
, leftGodeps
as well, just in case