templatecheck icon indicating copy to clipboard operation
templatecheck copied to clipboard

Invalid template causes templatecheck to panic

Open wttw opened this issue 1 year ago • 0 comments

When running templatecheck v0.7.0 with the attached sample it panics, after dereferencing a nil reflect.Type in indirectType().

The template has a bug, it doesn't pass a parameter into the subtemplate "cross", so I'd expect an error response.

main.go.txt

(This found several bugs in a set of templates I've been using in production for weeks, which I wouldn't have found without it. Definitely a useful library.)

wttw avatar Feb 09 '24 13:02 wttw