4 ms·
Care to contribute some of those to Revel? :) Out of curiosity, why do you prefer Mustache to Go templates? They seem extremely similar, with Go templates bei
by robfig 14y ago
Care to contribute some of those to Revel? :)
Out of curiosity, why do you prefer Mustache to Go templates? They seem extremely similar, with Go templates being slightly more powerful due to easy-to-add template funcs. Both are essentially data-driven though.
- grey-area 14y agoWould love to contribute but unfortunately have just been tinkering with Go; not using it for paid work, and therefore don't have much time for it. I like the look of revel though, and will be spending more time looking at it. Re Mustache versus go templates, I preferred the restrictions and clarity of mustache, because it forces you not to put any code in the view, all you can have are the basic constructs it provides, but it doesn't miss anything major IMHO. Here are the things I needed, which it provides: * loops * partials (with the neat {{> partial}} syntax * nested contexts * escaping by default * clear named keys, no '.' prefix, though I guess . would be OK between keys for subkeys (not possible in mustache as yet) * limited contexts (so that it's obvious what is being called) The differences are not major, and frankly either is a fine choice, but I actually preferred the limited syntax of mustache, and found the go template setup needlessly complex, in particular when including partials, I didn't spend too long on the decision though so perhaps I just misunderstood...