chore: use http.Status* instead of hard code (#1482)
This commit is contained in:
		@ -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")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user