From 120b41fe1d4ae6b7c3ab57841778384df008dbf4 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Wed, 2 Jul 2014 15:24:55 +0900 Subject: [PATCH] Fixes code examples in README --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 35f8962..4801c27 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,9 @@ func main() { message := "Hello "+name c.String(200, message) }) + + // Listen and server on 0.0.0.0:8080 + r.Run(":8080") } ``` @@ -167,6 +170,9 @@ func main() { } } }) + + // Listen and server on 0.0.0.0:8080 + r.Run(":8080") } ``` @@ -195,6 +201,9 @@ func main() { r.GET("/someXML", func(c *gin.Context) { c.XML(200, gin.H{"message": "hey", "status": 200}) }) + + // Listen and server on 0.0.0.0:8080 + r.Run(":8080") } ``` @@ -211,6 +220,9 @@ func main() { obj := gin.H{"title": "Main website"} c.HTML(200, "index.tmpl", obj) }) + + // Listen and server on 0.0.0.0:8080 + r.Run(":8080") } ``` @@ -222,6 +234,9 @@ func main() { r := gin.Default() html := template.ParseFiles("file1", "file2") r.HTMLTemplates = html + + // Listen and server on 0.0.0.0:8080 + r.Run(":8080") } ``` @@ -256,6 +271,9 @@ func main() { // it would print: "12345" log.Println(example) }) + + // Listen and server on 0.0.0.0:8080 + r.Run(":8080") } ```