From ad6d42b35cbc1735dcb99b5029d1a63a3caba431 Mon Sep 17 00:00:00 2001 From: milarin Date: Thu, 27 Jul 2023 17:12:16 +0200 Subject: [PATCH] added Error.Message method --- error.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/error.go b/error.go index b7370ec..5915b41 100644 --- a/error.go +++ b/error.go @@ -66,6 +66,10 @@ func (e *Error) Error() string { return b.String() } +func (e *Error) Message() string { + return e.msg +} + // 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 func (e *Error) Is(target error) bool {