mirror of
https://github.com/luckjiawei/podux.git
synced 2026-11-30 00:56:47 +00:00
14 lines
260 B
Go
14 lines
260 B
Go
package response
|
|
|
|
type ErrorResponse struct {
|
|
Error string `json:"error"`
|
|
}
|
|
|
|
func InternalServerError() ErrorResponse {
|
|
return ErrorResponse{Error: "Internal Server Error"}
|
|
}
|
|
|
|
func Error(err error) ErrorResponse {
|
|
return ErrorResponse{Error: err.Error()}
|
|
}
|