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

Fixed bug in HTML template example. #28

Closed
wants to merge 4 commits into from

Conversation

pinscript
Copy link
Contributor

This example would fail since ParseFiles returns multiple values.

I thought about error handling in the examples and I think we should catch errors and not ignore them. Ignoring errors seem to be a common (bad) habit for newcomers to go.

manucorporat and others added 3 commits July 2, 2014 20:17
- Reduces allocation overhead
- Reduces Garbage Collection stress
- Reduces memory fragmentation
@manucorporat
Copy link
Contributor

Thank you, how about this?

html := template.Must(template.ParseFiles("file1", "file2"))

@pinscript
Copy link
Contributor Author

Sorry, I messed that PR up. template.Must is of course a better way to do it.

@pinscript pinscript closed this Jul 3, 2014
@pinscript pinscript deleted the readme_html_fix branch July 3, 2014 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants