remove unnecessary use of fmt.Sprintf (#217)

* remove unnecessary use of fmt.Sprintf
pull/215/head
Adrian Perez 2020-01-03 13:36:54 +01:00 committed by GitHub
parent 6d954f502e
commit 004deef562
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -195,7 +195,7 @@ func Example_stackTrace() {
func ExampleCause_printf() {
err := errors.Wrap(func() error {
return func() error {
return errors.Errorf("hello %s", fmt.Sprintf("world"))
return errors.New("hello world")
}()
}(), "failed")

View File

@ -142,7 +142,7 @@ func TestStackTrace(t *testing.T) {
}, {
Cause(func() error {
return func() error {
return Errorf("hello %s", fmt.Sprintf("world"))
return Errorf("hello %s", fmt.Sprintf("world: %s", "ooh"))
}()
}()), []string{
`github.com/pkg/errors.TestStackTrace.func2.1` +