ggicci / httpin

🍡 HTTP Input for Go - HTTP Request from/to Go Struct (Bi-directional Data Binding between Go Struct and http.Request)
https://ggicci.github.io/httpin/
MIT License
315 stars 23 forks source link

Expose core.ErrUnsupportedType to clients to use `errors.Is()` #90

Closed alecsammon closed 9 months ago

alecsammon commented 9 months ago

Use owl.ErrUnsupportedType instead of internal error to allow users to use errors.Is()

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5d958eb) 90.77% compared to head (07c7bea) 90.73%. Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #90 +/- ## ========================================== - Coverage 90.77% 90.73% -0.05% ========================================== Files 33 33 Lines 1464 1479 +15 ========================================== + Hits 1329 1342 +13 - Misses 90 93 +3 + Partials 45 44 -1 ``` | [Flag](https://app.codecov.io/gh/ggicci/httpin/pull/90/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ggicci/httpin/pull/90/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci) | `90.73% <ø> (-0.05%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ggicci commented 9 months ago

Let's hide owl from the package users. We may create a name alias in httpin, e.g.

var ErrUnsupportedType = owl. ErrUnsupportedType