Yet another go api test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
329 B

package app
import (
"net/http"
u "../utils"
)
var NotFoundHandler = func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
u.Respond(w, u.Message(false, "This resources was not found on our server"))
next.ServeHTTP(w, r)
})
}