(rw http.ResponseWriter, errorMessage string, args ...interface{})
| 44 | } |
| 45 | |
| 46 | func BadRequestError(rw http.ResponseWriter, errorMessage string, args ...interface{}) { |
| 47 | rw.WriteHeader(http.StatusBadRequest) |
| 48 | log.Printf("Bad request: %s", fmt.Sprintf(errorMessage, args...)) |
| 49 | fmt.Fprintf(rw, "<h1>Bad Request</h1>") |
| 50 | } |
| 51 | |
| 52 | func ForbiddenError(rw http.ResponseWriter, errorMessage string, args ...interface{}) { |
| 53 | rw.WriteHeader(http.StatusForbidden) |
no test coverage detected