As you may have guesses, the html/package is not designed to perform such 
clever calculations. It handles only the html rendering logic.

You have 2 pretty good fallbacks actually : either precalculate and feed 
values to the template (server-side), or use javascript (client-side).
Cheers
Val

On Thursday, August 25, 2016 at 5:14:07 PM UTC+2, Carl Ranson wrote:
>
>
> HI All, 
>
> been playing with using go to pull data from a few sources and serve a 
> consolidated view as a webpage. 
> I've got most of it going ok, but hitting a wall trying to do a totals row 
> in an output table.
>
> anyone know if the html/template package is able to do this? 
>
> the fallback is to precalculate the totals and pass them as a struct to 
> the template as well. 
>
> thanks, 
> Carl. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to