Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/vet: detect uses of text/template with html templates #8221

Closed
josharian opened this issue Jun 17, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@josharian
Copy link
Contributor

commented Jun 17, 2014

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.
@josharian

This comment has been minimized.

Copy link
Contributor Author

commented Jul 3, 2014

Comment 1:

Status changed to Started.

@gopherbot

This comment has been minimized.

Copy link

commented Jul 3, 2014

Comment 2:

CL https://golang.org/cl/106370045 mentions this issue.
@dsymonds

This comment has been minimized.

Copy link
Member

commented Jul 11, 2014

Comment 3:

Owner changed to @josharian.

@gopherbot

This comment has been minimized.

Copy link

commented Sep 27, 2014

Comment 4:

CL https://golang.org/cl/151000043 mentions this issue.
@josharian

This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2015

Per discussion in the mailed CL, this isn't a compelling enough check to add.

@josharian josharian closed this Jan 9, 2015

@golang golang locked and limited conversation to collaborators Jun 25, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.