Enable perfsprint linter and fix up code#13220
Enable perfsprint linter and fix up code#13220alexandear wants to merge 1 commit intoprometheus:mainfrom alexandear:enable-perfsprint-linter
Conversation
|
Hello, |
|
@machine424 Hello, Apologies for any inconvenience caused. The pull request was closed because it's been open for quite a long period, specifically six months, without any reviews or further actions taken. If the information within the pull request is still pertinent and relevant, I can to reopen it. |
|
Yes, I think we can give this linter a try, it can help avoid regressions after changes like #13669. Thanks. (Maybe there is a glitch or sth, but I see that the PR was opened in 29/11/2023 and closed on the same day) |
|
@machine424 I created a new PR #14091, because it's not possible to re-open this due to the deleted fork.
Yes, you're correct. I got confused and provided the wrong reason for closing this PR. The correct reason is as follows: |
This PR enables perfsprint linter and fixes its issues.
Changes that improves both readability and performance are:
fmt.Sprintf("%d", x),fmt.Sprint(x)withstrconv.Itoa(x)for int values;fmt.Sprintf("%t", b)withstrconv.FormatBool(b)for bool values.