Cosmos-sdk: migrate to Go 1.13 error handling

Created on 29 Apr 2020  路  12Comments  路  Source: cosmos/cosmos-sdk

Summary

Currently errors & pkg/errors are used interchangeably.

Proposal

Migrate all error handling to errors pkg and/or fmt.Errorf("... %w", err).

once this is completed this linter can be enabled https://github.com/Djarvur/go-err113


For Admin Use

  • [x] Not duplicate issue
  • [x] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
code-hygiene good first issue help wanted stale

All 12 comments

We don't use fmt.Errorf("... %w", err), but we should stick to a single package 馃憤

Is anyone else working on this? I think this is something I'd like to help with.

Go for it!! No one is currently working on this

Do y'all prefer whether I switch to pkg/errors or errors?

Yes please

Which one?

'errors' sorry was quick to answer

I don't see any harm in sticking with pkg/errors. Best not to potentially introduce bugs 馃憤

types/errors/errors_test.go seems to be testing the differences between errors and pkg/errors. Is there something else that should happen here?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cwgoes picture cwgoes  路  3Comments

rigelrozanski picture rigelrozanski  路  3Comments

faboweb picture faboweb  路  3Comments

fedekunze picture fedekunze  路  3Comments

rigelrozanski picture rigelrozanski  路  3Comments