Closed omeid closed 6 years ago
I'm so sorry for the late reply. I'll think about it later. Thanks!
Not a problem. I managed to get it working but it is far more cumbersome, than for example how gcss is handled.
Any updates on this?
I completely agree - file streams or a byte buffer is all that's needed - why does the library need to know about file locations as strings? Carry around the least amount of baggage you need, not the most! :) There could be available convenience wrappers over the top of the library to allow for string based instantiation but they seem to go right down to the core. Imo an API clean up would require a complete rewrite as it seems to be threaded all throughout the library.
@yosssi your gcss library as infinitely cleaner, as it just takes an io.Reader and io.Writer object, basically what @omeid suggested, I'm wondering why the change in style for ace? Perhaps it's an older project?
First of all, thanks a lot for this package, as someone who really likes Jade I totally appreciate this project.
But the current API is over complicated. A similar api to the original
http/template
would be great, or at least something with the similar level of abstraction.If I want to compile a template, I just want.
And I would be happy.
And when working with Go templates, something like this would be ideal.
And I would be happy if you parsed/compiled my
[]byte
and stick it in thetemplate.Temlate
under the name supplied bystring
.Of course, the
map[string][]bytes
holds the includes.