fix: unmarshal and some tests

This commit is contained in:
yusing
2025-04-13 12:24:11 +08:00
parent be87d47ebb
commit 3f2dfe14b5
6 changed files with 100 additions and 101 deletions

View File

@@ -2,6 +2,7 @@ package gperr
import (
"encoding/json"
"errors"
"slices"
"strings"
@@ -64,7 +65,7 @@ func (err *withSubject) Prepend(subject string) *withSubject {
}
func (err *withSubject) Is(other error) bool {
return err.Err == other
return errors.Is(other, err.Err)
}
func (err *withSubject) Unwrap() error {