Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix golangci-lint fails #173

Merged
merged 3 commits into from Mar 31, 2023
Merged

Fix golangci-lint fails #173

merged 3 commits into from Mar 31, 2023

Conversation

thockin
Copy link
Contributor

@thockin thockin commented Mar 30, 2023

1 is a real bug. The rest are minor.

@@ -766,7 +766,7 @@ func (f Formatter) FormatError(err error, msg string, kvList []interface{}) (pre
loggableErr = err.Error()
}
args = append(args, "error", loggableErr)
return f.prefix, f.render(args, kvList)
return prefix, f.render(args, kvList)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this have a unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I added a new commit with a bunch of tests replicated in both formats, including one which would have caught this.

@pohly pohly merged commit 82f9555 into go-logr:master Mar 31, 2023
14 checks passed
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.

None yet

2 participants