16 lines
237 B
Go
16 lines
237 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
type ErrorResponse struct {
|
|
Error string `json:"error"`
|
|
}
|
|
|
|
func BadRequest(error string) (int, interface{}) {
|
|
return http.StatusBadRequest, ErrorResponse{
|
|
Error: getLocalizedMessage(error),
|
|
}
|
|
}
|