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

all: use errors.New() when there is no param rather than fmt.Errorf() #2247

Merged
merged 9 commits into from
Mar 11, 2024

Conversation

yasyzb
Copy link
Contributor

@yasyzb yasyzb commented Mar 1, 2024

Description

There are many fmt.Errorf() with no param.

Rationale

Parameterless errors should be using errors.New instead of fmt.Errorf.

Example

errors.New("invalid hex data")

Changes

Notable changes:

  • replace fmt.Errorf which has no param with errors.New

@zzzckck zzzckck changed the base branch from master to develop March 11, 2024 06:32
@zzzckck zzzckck merged commit 6386172 into bnb-chain:develop Mar 11, 2024
7 checks passed
@zzzckck
Copy link
Collaborator

zzzckck commented Mar 11, 2024

thx

@yasyzb yasyzb deleted the fix-fmt-errorf branch March 11, 2024 08:17
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.

4 participants