goHtmlTemplateExample icon indicating copy to clipboard operation
goHtmlTemplateExample copied to clipboard

runtime error

Open moadqassem opened this issue 10 years ago • 0 comments

Hello, I am wondering did you run your project and worked completely? because there is a small bug that keeps popping up when I run your project:

http: panic serving 127.0.0.1:* : runtime error: invalid memory address or nil pointer dereference

now to fix this issue you have to add Must method to the template call in line 32: templates = template.Must(template.New(templateName).ParseFiles(path))

I don't know after altering the code as I mentioned before it worked well for me :)

moadqassem avatar Feb 13 '15 12:02 moadqassem