[ANN] templatecheck: type-checking Go templates

222 views
Skip to first unread message

Jonathan Amsterdam

unread,
Jan 10, 2021, 5:21:00 PM1/10/21
to golang-nuts
The github.com/jba/templatecheck package[0] can validate field references and other operations of a text/template or html/template in tests or during program startup. It also works for github.com/google/safehtml/template[1].

Amnon

unread,
Jan 11, 2021, 1:50:29 AM1/11/21
to golang-nuts
This is really cool!

The world of templates has always been a  frightening departure from the type-safety of Go 
to the wild world of dynamically typed languages, where run-time errors hid in 
every code path.

templatecheck helps eliminate a large class of hard-to-find errors.
Thanks for writing it!
Reply all
Reply to author
Forward
0 new messages