take a look at my enhancements
Hi @benbjohnson,
could you please take a look at my fork (https://github.com/SlinSo/egon), that is unfortunately based on another fork (https://github.com/commondream/egon). I would like to know, if it is worth to rebase everything to your original version of ego.
I've made this fork after playing around with some bechmarks I made (https://github.com/SlinSo/goTemplateBenchmark)
I've added a few features and optimisations:
- Added flags to the egon command (based on kingpin package)
- Added type safe generation like in ftmpl
- Added Debug mode, otherwise dont print comments inside generated functions
- Added string optimisation, removed Sprintf for strings
- Added examples for framework integration
- Added minify, currently only tested with HTML code
- Added optional view generation (only needed for egon fork)
- Reverted fmt.Fprintf -> io.WriteString to avoid unnecessary allocations (only needed for egon fork)
Your fork is awesome, even compared to commondream/egon. +1 on (--help) and making views optional, extension optional... just thank you. Could you consider fielding some issues (turned off at the moment), as it seems your upstreams are just abandoned and you're the most modern of the few active ones ;)
Thanks!
I've enabled issues in my fork. I don't have much time the next 2 months, but I will look at incoming issues.
You may consider https://github.com/valyala/quicktemplate if you are not already settled on ego templates. It seems more feature rich to me.
I always have issues with new non-language specific syntax being added to the template engine syntax. You're literally learing a new pseudo language - this is why i like templates like ejs, minitpl, etc. and ultimately egon, and dislike ones like hogan, mustache... - the good ones just expose whatever programming language syntax you're already using without adding too many language specific features... quicktemplate doesn't seem to be on the good side of this.