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

Replace fmt.Sprint with faster alternatives #555

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

alexandear
Copy link
Contributor

The PR replaces fmt.Sprint.* statements with faster alternatives suggested by the perfsprint linter:

  • Replace fmt.Sprint(v) with strconv.FormatInt(v, 10), where v is int64.
  • Replace fmt.Sprint(v) with strconv.FormatUint(v, 10), where v is uint64.
  • Replace fmt.Sprint(v) with strconv.FormatBool(v), where v is bool.
  • Replace fmt.Errorf(msg) with errors.New(msg).

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.00%. Comparing base (01f4bac) to head (c0f4ed5).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #555   +/-   ##
=======================================
  Coverage   77.00%   77.00%           
=======================================
  Files          21       21           
  Lines        7270     7270           
=======================================
  Hits         5598     5598           
  Misses       1277     1277           
  Partials      395      395           

@goccy
Copy link
Owner

goccy commented Dec 12, 2024

Thank you for your contribution. This PR looks good. However, please note that I prefer to enable linters or perform refactoring at my own timing, so basically I do not plan to accept like these changes the next time. Thank you for your understanding.

@goccy goccy merged commit 342293d into goccy:master Dec 12, 2024
19 checks passed
@alexandear alexandear deleted the enable-perfsprint-linter branch December 12, 2024 15:43
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.

3 participants