From 2d1291329a909e85c7a3cd762bb9e064601b2824 Mon Sep 17 00:00:00 2001 From: Javier Provecho Fernandez Date: Mon, 5 Jan 2015 16:15:42 +0100 Subject: [PATCH] Fix #191 outdated documentation --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b1974ea..b49c9b0 100644 --- a/README.md +++ b/README.md @@ -321,7 +321,7 @@ Using LoadHTMLTemplates() ```go func main() { r := gin.Default() - r.LoadHTMLTemplates("templates/*") + r.LoadHTMLGlob("templates/*") r.GET("/index", func(c *gin.Context) { obj := gin.H{"title": "Main website"} c.HTML(200, "index.tmpl", obj) @@ -331,6 +331,11 @@ func main() { r.Run(":8080") } ``` +```html +

+ {{ .title }} +

+``` You can also use your own html template render