Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

remove unnecessary use of fmt.Sprintf #217

Merged
merged 3 commits into from Jan 3, 2020

Conversation

aperezg
Copy link
Member

@aperezg aperezg commented Jan 3, 2020

No description provided.

example_test.go Outdated
@@ -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.Errorf("hello %s", "world")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice but then why don't we write directly hello world with errors.New?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants