mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
18 lines
254 B
Go
18 lines
254 B
Go
|
package endpoint
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
type HandlerError struct {
|
||
|
Status int
|
||
|
Message string
|
||
|
Err error
|
||
|
}
|
||
|
|
||
|
func (e *HandlerError) Error() string {
|
||
|
if e.Err != nil {
|
||
|
return fmt.Sprintf("%s: %s", e.Message, e.Err.Error())
|
||
|
}
|
||
|
|
||
|
return e.Message
|
||
|
}
|