Add default case to router
parent
7b9a866570
commit
da572ebdd9
|
@ -311,6 +311,9 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
w.Write([]byte(strconv.Itoa(count)))
|
||||
default:
|
||||
httpError(w, r, fmt.Errorf("unknown endpoint"), http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue