Commit 77ff15ee authored by ysqi's avatar ysqi

Implement Error interface for validation error

parent 2a2b433e
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment