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

feat: support pointer types automatically #70

Closed ggicci closed 1 year ago

ggicci commented 1 year ago

Now when registering a Decoder of type T to httpin, httpin will automatically adpat the decoder to support decoding the following types:

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 92.81% and project coverage change: +0.28% :tada:

Comparison is base (9be6ca3) 96.45% compared to head (69dd349) 96.73%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #70 +/- ## ========================================== + Coverage 96.45% 96.73% +0.28% ========================================== Files 21 21 Lines 621 705 +84 ========================================== + Hits 599 682 +83 - Misses 15 16 +1 Partials 7 7 ``` | [Flag](https://app.codecov.io/gh/ggicci/httpin/pull/70/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/70/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci) | `96.73% <92.81%> (+0.28%)` | :arrow_up: | 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. | [Files Changed](https://app.codecov.io/gh/ggicci/httpin/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci) | Coverage Ξ” | | |---|---|---| | [core.go](https://app.codecov.io/gh/ggicci/httpin/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci#diff-Y29yZS5nbw==) | `100.00% <ΓΈ> (ΓΈ)` | | | [httpin.go](https://app.codecov.io/gh/ggicci/httpin/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci#diff-aHR0cGluLmdv) | `84.78% <ΓΈ> (ΓΈ)` | | | [extractor.go](https://app.codecov.io/gh/ggicci/httpin/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci#diff-ZXh0cmFjdG9yLmdv) | `93.82% <61.53%> (-6.18%)` | :arrow_down: | | [decoder.go](https://app.codecov.io/gh/ggicci/httpin/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci#diff-ZGVjb2Rlci5nbw==) | `96.42% <95.19%> (-0.35%)` | :arrow_down: | | [decoderadaptor.go](https://app.codecov.io/gh/ggicci/httpin/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci#diff-ZGVjb2RlcmFkYXB0b3IuZ28=) | `90.62% <95.45%> (+10.93%)` | :arrow_up: | | [directive.go](https://app.codecov.io/gh/ggicci/httpin/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci#diff-ZGlyZWN0aXZlLmdv) | `100.00% <100.00%> (ΓΈ)` | | | [errors.go](https://app.codecov.io/gh/ggicci/httpin/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci#diff-ZXJyb3JzLmdv) | `100.00% <100.00%> (ΓΈ)` | |

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