fix: example format.

This commit is contained in:
Bo-Yi Wu 2016-02-17 10:45:44 +08:00
parent 27f912f5b2
commit 00ff808ac5
1 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
package hello package hello
import ( import (
"net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"net/http"
) )
// This function's name is a must. App Engine uses it to drive the requests properly. // This function's name is a must. App Engine uses it to drive the requests properly.
@ -11,10 +11,10 @@ func init() {
r := gin.New() r := gin.New()
// Define your handlers // Define your handlers
r.GET("/", func(c *gin.Context){ r.GET("/", func(c *gin.Context) {
c.String(200, "Hello World!") c.String(200, "Hello World!")
}) })
r.GET("/ping", func(c *gin.Context){ r.GET("/ping", func(c *gin.Context) {
c.String(200, "pong") c.String(200, "pong")
}) })