mirror of
https://github.com/pkg/errors.git
synced 2025-05-31 11:42:45 +00:00
remove unnecessary use of fmt.Sprintf (#217)
* remove unnecessary use of fmt.Sprintf
This commit is contained in:
parent
6d954f502e
commit
004deef562
@ -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")
|
||||
|
||||
|
@ -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` +
|
||||
|
Loading…
x
Reference in New Issue
Block a user