honnef.co/go/tools@v0.4.7/staticcheck/testdata/src/example.com/CheckTemplate/CheckTemplate.go (about) 1 package pkg 2 3 import ( 4 th "html/template" 5 tt "text/template" 6 ) 7 8 const tmpl1 = `{{.Name}} {{.LastName}` 9 const tmpl2 = `{{fn}}` 10 11 func fn() { 12 tt.New("").Parse(tmpl1) //@ diag(`template`) 13 tt.New("").Parse(tmpl2) 14 t1 := tt.New("") 15 t1.Parse(tmpl1) 16 th.New("").Parse(tmpl1) //@ diag(`template`) 17 th.New("").Parse(tmpl2) 18 t2 := th.New("") 19 t2.Parse(tmpl1) 20 tt.New("").Delims("[[", "]]").Parse("{{abc-}}") 21 }