-
Notifications
You must be signed in to change notification settings - Fork 373
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
fix(tm2): rename methods to avoid conflicts with (un)marshaler interfaces #3000
Conversation
…aces amino codec.MarshallJSON has the same method name than Go standard library `json.Marshaler` interface but with a different signature. This is rejected by `go vet`. The same applies for codec.UnmarshallJSON vs `json.Unmarshaler`. To fix that, we rename codec.MarshalJSON to codec.JSONMarshal and codec.UnmarshalJSON to codec.JSONUnmarshal. Now `go vet ./...' pass on the full mono-repo. Fixes gnolang#2954.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3000 +/- ##
==========================================
- Coverage 63.33% 62.97% -0.36%
==========================================
Files 548 546 -2
Lines 78601 80221 +1620
==========================================
+ Hits 49784 50523 +739
- Misses 25461 26281 +820
- Partials 3356 3417 +61
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
this looks good to me, but probably requires a check through @jaekwon . |
very personal experience, but for the human brain, |
Let's merge this PR; we'll roll back if Jae has any objections. |
After merge of gnolang#3000, a few missing field names in struct literal were reported. Fix it. No functional change.
After merge of #3000, a few missing field names in struct literal were reported. Fix it. No functional change. <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [*] Added new tests, or not needed, or not feasible - [*] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [*] Updated the official documentation or not needed - [*] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details>
Amino
codec.MarshallJSON
has the same method name as Go standard libraryjson.Marshaler
interface but with a different signature. This is rejected bygo vet
. The same applies forcodec.UnmarshallJSON
vsjson.Unmarshaler
. To fix that, we renamecodec.MarshalJSON
tocodec.JSONMarshal
andcodec.UnmarshalJSON
tocodec.JSONUnmarshal
.Now `go vet ./...' pass on the full mono-repo.
Fixes #2954.
BREAKING CHANGE: rename tm2 amino exported methods.
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description