I try to inject a bunch of JS expressions into a html template. I mark the places where the expressions need to go within the template using {{.Statment1}}, ... and I'm passing the data (struc of statements) to the t.Execute(w, data). Unfortunately, this will result in double quotes around all my JS expressions. What I do now to get around that is defining my entire JS code on the go side with buffer := bytes.NewBufferString("") and pass it to the Execute as t.Execute(w, template.JS(buffer.String()) - this is of cause not very elegant - and makes the js code not really readable anymore. Is there another way to get around the double quotes in the original approach?