We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import ( "fmt" "testing" "github.com/davecgh/go-spew/spew" "github.com/stretchr/testify/assert" ) type NestedErr struct { Err error } func (e *NestedErr) Error() string { return e.Err.Error() } type ErrWrap struct { NestedErr *NestedErr } func TestIfPanic(t *testing.T) { its := assert.New(t) err := ErrWrap{ NestedErr: &NestedErr{ Err: fmt.Errorf("this is an error"), }, } its.NotPanics(func() { ss := spew.Sdump(err) fmt.Println("LOGGING", ss) }) }
go version go1.20.3 darwin/arm64 spew version: github.com/davecgh/go-spew v1.1.1
Note that this does not panic if I try to dump a pointer to ErrWrap e.g.
ErrWrap
err := &ErrWrap{ NestedErr: &NestedErr{ Err: fmt.Errorf("this is an error"), }, }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
go version go1.20.3 darwin/arm64
spew version: github.com/davecgh/go-spew v1.1.1
Note that this does not panic if I try to dump a pointer to
ErrWrap
e.g.The text was updated successfully, but these errors were encountered: