added Error.Message method
This commit is contained in:
parent
e274a0473a
commit
ad6d42b35c
4
error.go
4
error.go
@ -66,6 +66,10 @@ func (e *Error) Error() string {
|
|||||||
return b.String()
|
return b.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (e *Error) Message() string {
|
||||||
|
return e.msg
|
||||||
|
}
|
||||||
|
|
||||||
// Is implements the error equality function used by errors.Is()
|
// Is implements the error equality function used by errors.Is()
|
||||||
// It returns true if the error is the same instance or is created using the same ErrTmpl
|
// It returns true if the error is the same instance or is created using the same ErrTmpl
|
||||||
func (e *Error) Is(target error) bool {
|
func (e *Error) Is(target error) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user