1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-25 13:30:49 +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 {