News for hackers. Stuff that matters.
Re:Go Web Examples by irq-1 on Friday February 10, 2017 @11:46AM (#13616745)
The templating is fast and safe but a pain to use. For example, an HTML Select needs a 3-value list: id,text,selected bool. You can't evaluate a comparison (if...) or call a function in the template. It's unpleasant.
Re:Go Web Examples by grey-area on Friday February 10, 2017 @12:11PM (#13616959)
You can call functions and methods in templates, and you can use if else, they actually have all the tools you need to do things like provide helper functions and produce a full html select with something like:

    {{ select "Order" "form_name" .value .options }}
Granted those helper functions don't exist in the base templates, but the tools are there to build them.