Einthusan Vigneswaran

Results 26 comments of Einthusan Vigneswaran

@WHIT3 Yes, Im already doing something like this for now, but just wanted to raise the issue. Seems like the developer does not have time for this package anymore, not...

@julienschmidt thanks for the response. yes, currently I am doing a work around. great work thus far.

Please no "one-line magic" functions.. we use the cgo (youtube/vitess) gzip package, not the std go gzip package. What package would httprouter use? better leave that out of the equation....

Things to consider - different filetypes may need different expiry values - instant cache buster url param `"/src/:buster/*filepath"` where `buster` might be app version - maybe the need to not...

as for naming, `router.ServeFilesFiltered`

I would say the question is "Do we really need a new `ServeFiles` function?" and my answer is yes. The current one is just too limited, and the workaround is...

Now, if you want more features, the package can provide some defaults. ``` go // custom file server router.ServeFiles("/src/*filepath", http.Dir("/var/www"), httprouter.BasicFilter(3*time.Hour), httprouter.GzipFilter(9), MyLessFilter()) ```

or more neatly written example, ``` go // custom file server router.ServeFiles("/src/*filepath", http.Dir("/var/www"), httprouter.BasicFilter(3*time.Hour), httprouter.GzipFilter(9), MyLessFilter(), ) ```

Let me know if you need an example or not, but let me try to be quick about it. You would pass in a "fake" `w` which is just a...

Oh and your right about order being important, my example is wrong just for the record, it does gzip and cache before less filter lol.