Skip to content

Commit

Permalink
Simplifying error handlers again.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdegges committed Sep 28, 2015
1 parent 24e758e commit d9b44c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/error_handlers.go
Expand Up @@ -9,13 +9,13 @@ import (
"net/http"
)

// NotFound renders a not found response for invalid API endpoints.
func NotFound(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(404)
}

// MethodNotAllowed renders a method not allowed response for invalid request
// types.
func MethodNotAllowed(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(405)
}

// NotFound renders a not found response for invalid API endpoints.
func NotFound(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(404)
}

0 comments on commit d9b44c0

Please sign in to comment.