mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
fix: v2.9.5 (#4503)
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user