Hi,
This looks like a bug in the html/template package:
https://play.golang.org/p/TWaBZ4MwOd
I expect that the {{- and -}} would trim the spaces surrounding the
variable values like this:
<script>
var s =string;
var b =true;
var i =42;
var f =42.2;
</script>
but instead the output is:
<script>
var s ="string";
var b = true ;
var i = 42 ;
var f = 42.2 ;
</script>
Notice that only the spaces surrounding the "string" value is trimmed,
and for the others the spaces seem to have been collapsed into a
single space.
nazri