-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
chore(all): replace all fmt.Errorf
without paramters with errors.New
#21590
Conversation
WalkthroughWalkthroughThe changes involve modifications to error handling in several files, specifically transitioning from Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant System
User->>System: Send Request
alt Request is valid
System-->>User: Processed Response
else Request is invalid
System-->>User: Return Error (using errors.New)
end
Tip New featuresWalkthrough comment now includes:
Notes:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (3)
- indexer/postgres/params.go (3 hunks)
- server/v2/cometbft/commands.go (1 hunks)
- x/bank/v2/keeper/query_server.go (2 hunks)
Files skipped from review due to trivial changes (2)
- indexer/postgres/params.go
- server/v2/cometbft/commands.go
Additional context used
Path-based instructions (1)
x/bank/v2/keeper/query_server.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (1)
x/bank/v2/keeper/query_server.go (1)
24-24
: Approved change fromfmt.Errorf
toerrors.New
.The change to use
errors.New
for a static error message is a good practice when no formatting is required, making the code simpler and more readable. This aligns well with the PR's objective and the Uber Golang style guide.
Are you aware of a linter to add in golangci-lint for that? If so, that would make sense to add it. |
Okay, I will try it later |
Description
This PR cleans up all
fmt.Errorf
without parameters witherrors.New
among whole codebaseSummary by CodeRabbit
Bug Fixes
Chores