remove unnecessary use of fmt.Sprintf (#217)
* remove unnecessary use of fmt.Sprintf
diff --git a/example_test.go b/example_test.go
index c1fc13e..7d0e286 100644
--- a/example_test.go
+++ b/example_test.go
@@ -195,7 +195,7 @@
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")
diff --git a/stack_test.go b/stack_test.go
index 1acd719..aa10a72 100644
--- a/stack_test.go
+++ b/stack_test.go
@@ -142,7 +142,7 @@
}, {
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` +