From 0eb7c443fc6ad27d1df47757e91e4ee97f4d973c Mon Sep 17 00:00:00 2001 From: Eugen Sumin Date: Fri, 2 Feb 2024 12:37:01 +0100 Subject: [PATCH] Fix comments --- errors.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/errors.go b/errors.go index b1f3252..6fa8f00 100644 --- a/errors.go +++ b/errors.go @@ -49,7 +49,7 @@ func Wrap(err error, message string, details ...any) error { return e } -// WithStack wraps the given pure error with a struct that when serialized to JSON will return +// WithStack wraps the given error with a struct that when serialized to JSON will return // a JSON object with the error message and error stack data. // // Returns nil when nil is passed. @@ -135,6 +135,7 @@ func (e *errkitError) Error() string { return fmt.Sprintf("%s: %s", e.error.Error(), e.cause.Error()) } +// MarshalJSON is helping json logger to log error in a json format func (e *errkitError) MarshalJSON() ([]byte, error) { return MarshalErrkitErrorToJSON(e) }