Skip to content

invalid-template

Detect invalid constant text and HTML templates.

Updated View as Markdown

Default severity: error

Checks constant templates in direct template.New(...).Parse(...) chains. Receivers that may use custom delimiters are left alone.

Bad

template.New("greeting").Parse(`Hello, {{.Name}`) // reported

Good

template.New("greeting").Parse(`Hello, {{.Name}}`)
Navigation

Type to search…

↑↓ navigate↵ selectEsc close