Skip to content

Commit

Permalink
rm errors.Join
Browse files Browse the repository at this point in the history
  • Loading branch information
lainio committed Sep 25, 2023
1 parent 29ce250 commit bafa277
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions err2_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package err2_test

import (
"errors"
"fmt"
"io"
"os"
Expand Down Expand Up @@ -905,9 +904,9 @@ func doWork(ePtr *error, r any) {
case nil:
return
case runtime.Error:
*ePtr = errors.Join(v, *ePtr)
*ePtr = fmt.Errorf("%v: %w", *ePtr, v)
case error:
*ePtr = errors.Join(v, *ePtr)
*ePtr = fmt.Errorf("%v: %w", *ePtr, v)
default:
// panicing
}
Expand Down

0 comments on commit bafa277

Please sign in to comment.