.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.1.1 / staticcheck / testdata / src / CheckTemplate / CheckTemplate.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/staticcheck/testdata/src/CheckTemplate/CheckTemplate.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/staticcheck/testdata/src/CheckTemplate/CheckTemplate.go
new file mode 100644 (file)
index 0000000..f4e1cc6
--- /dev/null
@@ -0,0 +1,21 @@
+package pkg
+
+import (
+       th "html/template"
+       tt "text/template"
+)
+
+const tmpl1 = `{{.Name}} {{.LastName}`
+const tmpl2 = `{{fn}}`
+
+func fn() {
+       tt.New("").Parse(tmpl1) // want `template`
+       tt.New("").Parse(tmpl2)
+       t1 := tt.New("")
+       t1.Parse(tmpl1)
+       th.New("").Parse(tmpl1) // want `template`
+       th.New("").Parse(tmpl2)
+       t2 := th.New("")
+       t2.Parse(tmpl1)
+       tt.New("").Delims("[[", "]]").Parse("{{abc-}}")
+}