From b8ab9554dcd768ff6d089e9a81a0646918228b8c Mon Sep 17 00:00:00 2001 From: Remco Date: Tue, 2 Dec 2014 15:28:38 +0100 Subject: [PATCH 1/2] Updated to use SetHTMLTemplate() --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 82a1584..a378c79 100644 --- a/README.md +++ b/README.md @@ -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") From af9a6bcb4d87b79fb966f2b98a08adc77951911a Mon Sep 17 00:00:00 2001 From: Remco Date: Tue, 2 Dec 2014 15:39:24 +0100 Subject: [PATCH 2/2] Fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a378c79..f0ef3e9 100644 --- a/README.md +++ b/README.md @@ -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}) })