From a660a6eb6e776060f85b4d0edd5edee72ffe49c7 Mon Sep 17 00:00:00 2001 From: Skuli Oskarsson Date: Mon, 30 Jun 2014 22:58:45 +0000 Subject: [PATCH] Fixed some more code in the readme file There were some more errors in the code snippets --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ed6467de..cf006e97 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ import "github.com/gin-gonic/gin" func main() { r := gin.Default() - r.GET("ping", func(c *gin.Context){ + r.GET("/ping", func(c *gin.Context){ c.String(200, "pong") }) @@ -207,7 +207,7 @@ Using LoadHTMLTemplates() func main() { r := gin.Default() r.LoadHTMLTemplates("templates/*") - r.GET("index", func(c *gin.Context) { + r.GET("/index", func(c *gin.Context) { obj := gin.H{"title": "Main website"} c.HTML(200, "index.tmpl", obj) }) @@ -250,7 +250,7 @@ func main() { r := gin.New() r.Use(Logger()) - r.GET("test", func(c *gin.Context){ + r.GET("/test", func(c *gin.Context){ example := r.Get("example").(string) // it would print: "12345"