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

perf: use errors.New to replace fmt.Errorf with no parameters #197

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

Conversation

ChengenH
Copy link

If you don't need to format the string, recommended to use error.New().

@0xvbetsun
Copy link

0xvbetsun commented Apr 20, 2024

hello @ChengenH, thank you for the enhancement! Would you mind changing fmt.Errorf() to errors.New() also in:

  • message.go
  • transaction.go
  • cmd/sinc/cmd/*.go
  • programs/address-lookup-tables/*.go
  • programs/bpf-loader/loader.go
  • programs/serum/*.go
  • programs/system/*.go
  • programs/token/*go
  • programs/tokenregistry/*go
  • rpc/types.go
  • rpc/sendAndConfirmTransaction.go
  • rpc/ws/blockSubscribe.go
  • rpc/ws/signatureSubscribe.go
  • vault/kmsgcp.go
  • vault/passphrases.go

to be consistent in your performance and style improvement.
If it is tedious for you, I'll do it

@ChengenH
Copy link
Author

ChengenH commented Apr 20, 2024

hello @ChengenH, thank you for the enhancement! Would you mind changing fmt.Errorf() to errors.New() also in:

  • message.go
  • transaction.go
  • cmd/sinc/cmd/*.go
  • programs/address-lookup-tables/*.go
  • programs/bpf-loader/loader.go
  • programs/serum/*.go
  • programs/system/*.go
  • programs/token/*go
  • programs/tokenregistry/*go
  • rpc/types.go
  • rpc/sendAndConfirmTransaction.go
  • rpc/ws/blockSubscribe.go
  • rpc/ws/signatureSubscribe.go
  • vault/kmsgcp.go
  • vault/passphrases.go

to be consistent in your performance and style improvement. If it is tedious for you, I'll do it

I'm done

Copy link

@0xvbetsun 0xvbetsun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!! thank you

@ChengenH
Copy link
Author

awesome!! thank you

I think you should check again

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.

None yet

2 participants