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

refactor: use errors.New to replace fmt.Errorf with no parameters & fix typo #1653

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LesCyber
Copy link

@LesCyber LesCyber commented Mar 3, 2025

  1. use errors.New to replace fmt.Errorf with no parameters
  2. fix typo
  3. unify the error handling methods that are different from the project style

Replaced fmt.Errorf with errors.New in cases where formatting is not required. This reduces unnecessary function calls, leading to slightly improved performance and cleaner code.

Signed-off-by: LesCyber <andi4cing@gmail.com>
@LesCyber LesCyber requested a review from a team as a code owner March 3, 2025 12:09
Signed-off-by: LesCyber <andi4cing@gmail.com>
@LesCyber LesCyber changed the title refactor: use errors.New to replace fmt.Errorf with no parameters refactor: use errors.New to replace fmt.Errorf with no parameters & fix typo Mar 3, 2025
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.95%. Comparing base (490539e) to head (2934572).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1653   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         337      337           
  Lines       29607    29607           
=======================================
  Hits        29595    29595           
  Misses          8        8           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant