justinas / nosurf

CSRF protection middleware for Go.

Home Page:http://godoc.org/github.com/justinas/nosurf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove examples folder

alexedwards opened this issue · comments

Using gvt (and presumably other tools that support automatic recursive dependency vendoring) leads to a bunch of dependencies being unnecessarily added when vendoring nosurf.

$ gvt fetch github.com/justinas/nosurf
2016/05/23 19:44:37 fetching recursive dependency github.com/hoisie/web
2016/05/23 19:44:41 fetching recursive dependency github.com/zenazn/goji
2016/05/23 19:44:46 fetching recursive dependency golang.org/x/net/websocket

It looks like this is because of the examples folder being in the main repository.

Renaming the examples directory to _examples would fix this for users of gvt. I'm unsure about other vendoring tools.

My gut feeling is it would be cleaner and safer to move these examples out of the main repository (where they're not actually needed) though. Perhaps to gists and referencing them from the readme instead? I'm happy to do that and send a PR.

Removed the examples for now, will consider re-adding them to Wiki. Updates to the examples are much needed anyway.

Using gvt (and presumably other tools that support automatic recursive dependency vendoring) leads to a bunch of dependencies being unnecessarily added when vendoring nosurf.

Should the dependency vendoring tools figure out which dependencies are actually used/needed (e.g., github.com/justinas/nosurf) and which ones are not (e.g., github.com/justinas/nosurf/examples), and only vendor those?