If I have the following template:
const homeTmpl = `<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Go Pratice</title>
</head>
<body>
{{.Error}}
<h1>From string literal</h1>
Hello {{.Name}}
</body>
</html>`
And I execute it with a struct that doesn't have, for example, Error, something like
type data struct {
Name string
}
The template will stop the render when it reaches {{.Error}} resulting in a blank page.
There are no errors to be detected.
Why? Is there a way to debug this in more complex templates where the data passed doesn't have all of the required properties/pipelines (whatever those are called)?