-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
html/template: user-defined function is not parsed via ParseFiles #32934
Comments
When possible, please post code examples as runnable links to https://play.golang.org rather than isolated snippets. |
Note that both of your
|
Please provide a complete example that illustrates the problem. |
@bcmills will be updating the complete data shortly. |
This has been in waiting for info for 2 years, it was reported against a version of Go that is no longer supported, and we still don't have an auto-contained reproducer, so let's archive this. If it comes out again on a recent Go version we can open a new issue. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, its with 1.12 release
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have a HTML template; Along with all the CSS and HTML tags, below is the template I want to iterate over. I have stored this as a file in HTML format.
Now I have the following snippet of code for incrementing the Index in the template.
When I execute the above code, nothing is getting parsed. But if I parse the same template passed to the template as a string like below
this later one via []byte is working.
What did you expect to see?
Should have the index incremented with +1
What did you see instead?
The template file was not parsed.
The text was updated successfully, but these errors were encountered: