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

feat: check whether nested types implement a Marshaler interface #84

Merged
merged 1 commit into from Mar 26, 2024

Conversation

octo
Copy link
Contributor

@octo octo commented Mar 25, 2024

Previously, only the top-level type was checked whether it implemented one of the provided interfaces. Nested types were not checked.

This leads to false positives, for example when one field is of a struct type implementing json.Marshaller.

Previously, only the top-level type was checked whether it implemented one of
the provided interfaces. Nested types were not checked.

This leads to false positives, for example when one field is of a struct type
implementing `json.Marshaller`.
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.06%. Comparing base (1964f4d) to head (3eaecda).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
+ Coverage   76.05%   79.06%   +3.01%     
==========================================
  Files           3        3              
  Lines         213      215       +2     
==========================================
+ Hits          162      170       +8     
+ Misses         36       32       -4     
+ Partials       15       13       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tmzane tmzane self-requested a review March 26, 2024 08:31
@tmzane tmzane changed the title feat: Check whether nested types implement a valid interface. feat: check whether nested types implement a Marshaler interface Mar 26, 2024
@tmzane tmzane merged commit f16d6ea into go-simpler:main Mar 26, 2024
7 checks passed
@tmzane
Copy link
Member

tmzane commented Mar 26, 2024

Thanks a lot!

@octo octo deleted the fforster/nested-interface branch March 26, 2024 13:58
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