1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 00:40:54 +00:00

Implement Error interface for validation error

This commit is contained in:
ysqi 2016-05-05 19:26:03 +08:00
parent 2a2b433e19
commit 77ff15ee33

View File

@ -73,6 +73,10 @@ func (e *Error) String() string {
return e.Message
}
// Implement Error interface.
// Return e.String()
func (e *Error) Error() string { return e.String() }
// Result is returned from every validation method.
// It provides an indication of success, and a pointer to the Error (if any).
type Result struct {