-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstd_lib.go
More file actions
27 lines (23 loc) · 769 Bytes
/
Copy pathstd_lib.go
File metadata and controls
27 lines (23 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package errors
import (
"errors"
)
// As is a direct callout to the std lib errors.As function. This
// allows users to only ever have to worry about including one
// errors pkg.
func As(err error, target any) bool {
return errors.As(err, target)
}
// Is is a direct callout to the std lib errors.Is function. This
// allows users to only ever have to worry about including one
// errors pkg.
func Is(err, target error) bool {
return errors.Is(err, target)
}
// Unwrap is a direct callout to the std lib errors.Unwrap function.
// This allows users to only ever have to worry about including one
// errors pkg. The use of the std lib errors.Unwrap is a now thing,
// but may change in future releases.
func Unwrap(err error) error {
return errors.Unwrap(err)
}