chore: use http.Status* instead of hard code (#1482)

This commit is contained in:
田欧
2018-08-14 09:51:56 +08:00
committed by Bo-Yi Wu
parent 8aef947f6e
commit f45c928a15
20 changed files with 209 additions and 192 deletions

View File

@ -1,6 +1,8 @@
package main
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/thinkerou/favicon"
)
@ -9,7 +11,7 @@ func main() {
app := gin.Default()
app.Use(favicon.New("./favicon.ico"))
app.GET("/ping", func(c *gin.Context) {
c.String(200, "Hello favicon.")
c.String(http.StatusOK, "Hello favicon.")
})
app.Run(":8080")
}