Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/vet: detect uses of text/template with html templates #8221
Proposed vet check: Examine text/template parsing calls. If they load from a file (ParseFiles, ParseGlob), complain if the filename ends in ".html". If they load from a constant string (Parse), complain if the string starts with "<html>" and ends with "</html>". Inspired by CL 105250044. I'm happy to implement, gather data, and refine, but I would like to get feedback on the general idea before starting.