Text and HTML templates / Built-in functions / Ess

Run Settings
LanguageGo
Language Version
Run Command
package main import ( "log" "os" "text/template" ) const tmplStr = `js escape : {{ js .JS }} html escape: {{ html .HTML }} url escape : {{ urlquery .URL }} ` func main() { t := template.Must(template.New("print").Parse(tmplStr)) data := struct { JS string HTML string URL string }{ JS: `function me(s) { return "foo"; }`, HTML: `<div>text</div>`, URL: `http://www.programming-books.io`, } err := t.Execute(os.Stdout, data) if err != nil { log.Fatalf("t.Execute() failed with '%s'\n", err) } }
Editor Settings
Theme
Key bindings
Full width
Lines