martini-contrib / render

Martini middleware/handler for easily rendering serialized JSON, XML, and HTML template responses.
MIT License
245 stars 57 forks source link

Add a feature of loading templates from binary data generated by go-bindata #28

Open yosssi opened 10 years ago

yosssi commented 10 years ago

I added a feature of loading templates from binary data generated by go-bindata.

I created martini-contrib/staticbin so that Martini can serve static files from binary data.

By adding this feature on martini-contrib/render, a web application using Martini can be compiled into a single binary file completely.

I would be glad if you could merge this PR.

[Changes]

I thought of creating a new middleware which has this feature. But martini-contrib/render had various important features and I thought it was not good idea to create a new middleware similar to this one, so I decided to add this feature on the existing martini-contrib/render middleware.

Thanks.

hypebeast commented 10 years ago

Hi Yosssi,

I just added support for martini-contrib/staticbin to martini-contrib/render (https://github.com/hypebeast/render). Unfortunately, I didn't check the open pull requests for render and overlooked your work.

I tested your fork and it works quite well for me. Great work and thanks for the great staticbin library.

yosssi commented 10 years ago

Hi @hypebeast,

Thanks for your comment and reviewing!

Maybe, it's a good idea to check if the asset is actually a template. Otherwise, non template files with the same extension as the templates gets compiled, too. It should be enough to check if the asset is part of the templates directory.

Oh, you are right and I didn't notice that! I fixed it.

Thanks for your valuable advice!

Hope that this PR will be merged and we will be able to use this feature soon.

hypebeast commented 10 years ago

I hope it to :)

pboehm commented 10 years ago

:+1:

donovanhide commented 10 years ago

:thumbsup:

yosssi commented 10 years ago

@pboehm @donovanhide Thanks!

ghophp commented 8 years ago

:+1: merge please :D