projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Giant blob of minor changes
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
coc-go-data
/
tools
/
pkg
/
mod
/
honnef.co
/
go
/
tools@v0.0.1-2020.1.5
/
staticcheck
/
testdata
/
src
/
CheckTemplate
/
CheckTemplate.go
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) // want `template`
13
tt.New("").Parse(tmpl2)
14
t1 := tt.New("")
15
t1.Parse(tmpl1)
16
th.New("").Parse(tmpl1) // want `template`
17
th.New("").Parse(tmpl2)
18
t2 := th.New("")
19
t2.Parse(tmpl1)
20
tt.New("").Delims("[[", "]]").Parse("{{abc-}}")
21
}