Skip to content

Commit

Permalink
fix build version issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Weber committed Jan 8, 2025
1 parent a4ce0fd commit 7b5585e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
19 changes: 0 additions & 19 deletions errwrap/go_123_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"strconv"
"testing"
)

Expand Down Expand Up @@ -116,24 +115,6 @@ func ExampleUnwrapGroups() {
// error 2
}

type errWalkTest struct {
cause error
sub []error
v int
}

func (e *errWalkTest) Error() string {
return strconv.Itoa(e.v)
}

func (e *errWalkTest) Unwrap() error {
return e.cause
}

func (e *errWalkTest) Errors() []error {
return e.sub
}

func testFind(err error, v int) bool {
return WalkDeep(err, func(err error) bool {
e := err.(*errWalkTest)
Expand Down
19 changes: 19 additions & 0 deletions errwrap/wrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package errwrap
import (
"errors"
"fmt"
"strconv"
"testing"
)

Expand Down Expand Up @@ -46,6 +47,24 @@ func WrapfFn(msg string, args ...interface{}) func(error) error {
}
}

type errWalkTest struct {
cause error
sub []error
v int
}

func (e *errWalkTest) Error() string {
return strconv.Itoa(e.v)
}

func (e *errWalkTest) Unwrap() error {
return e.cause
}

func (e *errWalkTest) Errors() []error {
return e.sub
}

func TestWalkDeepComplexTree(t *testing.T) {
err := &errWalkTest{v: 1, cause: &errWalkTest{
sub: []error{
Expand Down

0 comments on commit 7b5585e

Please sign in to comment.