Using template.Must to fix multiple return issue.

This commit is contained in:
Alexander Nyquist 2014-07-03 17:32:47 +02:00
parent 31c3b913ac
commit 8e7b817460
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ You can also use your own html template render
import "html/template"
func main() {
r := gin.Default()
html := template.ParseFiles("file1", "file2")
html := template.Must(template.ParseFiles("file1", "file2"))
r.HTMLTemplates = html
// Listen and server on 0.0.0.0:8080