Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
e-sumin committed Feb 2, 2024
1 parent 06606d2 commit 0eb7c44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
}

0 comments on commit 0eb7c44

Please sign in to comment.