Skip to content

Commit b502428

Browse files
committed
Revert "Add errors.AsError() to get back that behaviour"
This reverts commit 11b3e1b.
1 parent 11b3e1b commit b502428

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,4 @@ everyone can benefit.
6666
This package is licensed under the MIT license, see LICENSE.MIT for details.
6767

6868
## Changelog
69-
* v1.1.0 updated to use go1.13's standard-library errors.Is method instead of == in errors.Is
70-
* v1.2.0 added `errors.As` from the standard library.
71-
* v1.3.0 *BREAKING* updated error methods to return `error` instead of `*Error`.
72-
> Code that needs access to the underlying `*Error` can use the new errors.AsError(e)
73-
> ```
74-
> // before
75-
> errors.New(err).ErrorStack()
76-
> // after
77-
>. errors.AsError(errors.Wrap(err)).ErrorStack()
78-
> ```
69+
* v1.1.0 updated to use go1.13's standard-library errors.Is method instead of == in errors.Is

error.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,3 @@ func (err *Error) TypeName() string {
207207
func (err *Error) Unwrap() error {
208208
return err.Err
209209
}
210-
211-
// AsError converts e to an *errors.Error.
212-
// If e does not already have a stacktrace attached, the current stack
213-
// will be added.
214-
func AsError(e error) *Error {
215-
return Wrap(e, 1).(*Error)
216-
}

0 commit comments

Comments
 (0)