Przeglądaj źródła

Merge pull request #535 from appleboy/patch-1

fix: example format.
Javier Provecho Fernandez 9 lat temu
rodzic
commit
b3878c2465
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      examples/app-engine/hello.go

+ 4 - 4
examples/app-engine/hello.go

@@ -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,13 +11,13 @@ 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")
 	})
 	})
 
 
 	// Handle all requests using net/http
 	// Handle all requests using net/http
 	http.Handle("/", r)
 	http.Handle("/", r)
-}
+}