Conditional in the template

Sunday, May 17, 2015

http://play.golang.org/p/QtqMIIQTj6

Note the weird conditional syntax, else you will have odd error messages like:

panic: template: foo:8:5: executing "foo" at <.Bar>: Bar has arguments but cannot be invoked as function