Skip to content

remove unnecessary use of fmt.Sprintf#217

Merged
aperezg merged 3 commits intopkg:masterfrom
aperezg:remove_unnecessary_use_fmt.Sprintf
Jan 3, 2020
Merged

remove unnecessary use of fmt.Sprintf#217
aperezg merged 3 commits intopkg:masterfrom
aperezg:remove_unnecessary_use_fmt.Sprintf

Conversation

@aperezg
Copy link
Copy Markdown
Member

@aperezg aperezg commented Jan 3, 2020

No description provided.

example_test.go Outdated
err := errors.Wrap(func() error {
return func() error {
return errors.Errorf("hello %s", fmt.Sprintf("world"))
return errors.Errorf("hello %s", "world")
Copy link
Copy Markdown

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 join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants