11 lines
234 B
Go
11 lines
234 B
Go
package query
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func RespondWithBadRequest(w http.ResponseWriter, _ *http.Request, err error) {
|
|
text := http.StatusText(http.StatusBadRequest) + ": " + err.Error()
|
|
http.Error(w, text, http.StatusBadRequest)
|
|
}
|