Merge pull request #168 from dutchcoders/develop

Updated to use SetHTMLTemplate()
This commit is contained in:
Javier Provecho Fernandez 2014-12-29 13:03:03 +01:00
commit c8dedf7f39

View File

@ -284,7 +284,7 @@ func main() {
func main() {
r := gin.Default()
// gin.H is a shortcup for map[string]interface{}
// gin.H is a shortcut for map[string]interface{}
r.GET("/someJSON", func(c *gin.Context) {
c.JSON(200, gin.H{"message": "hey", "status": 200})
})
@ -340,7 +340,7 @@ import "html/template"
func main() {
r := gin.Default()
html := template.Must(template.ParseFiles("file1", "file2"))
r.HTMLTemplates = html
r.SetHTMLTemplate(html)
// Listen and server on 0.0.0.0:8080
r.Run(":8080")