Use contants from http package.
This commit is contained in:
parent
7ed4ae2f8c
commit
05a9350e57
16 changed files with 68 additions and 62 deletions
|
@ -14,7 +14,7 @@ type Handler struct {
|
|||
|
||||
// AddRoutes add ping routes on a router
|
||||
func (g Handler) AddRoutes(router *mux.Router) {
|
||||
router.Methods("GET", "HEAD").Path("/ping").
|
||||
router.Methods(http.MethodGet, http.MethodHead).Path("/ping").
|
||||
HandlerFunc(func(response http.ResponseWriter, request *http.Request) {
|
||||
fmt.Fprint(response, "OK")
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue