fix: v2.9.5 (#4503)

This commit is contained in:
hailaz
2025-11-10 21:40:35 +08:00
committed by GitHub
parent fde47e8981
commit 1e3aa5f080
46 changed files with 135 additions and 99 deletions

View File

@ -31,6 +31,7 @@ func NewWithOption(option Option) error {
}
// NewOption creates and returns a custom error with Option.
//
// Deprecated: use NewWithOption instead.
func NewOption(option Option) error {
return NewWithOption(option)

View File

@ -117,6 +117,7 @@ func As(err error, target any) bool {
// HasError performs as Is.
// This function is designed and implemented early before errors.Is of go stdlib.
//
// Deprecated: use Is instead.
func HasError(err, target error) bool {
return errors.Is(err, target)