gin-contrib / timeout

Timeout middleware for Gin
MIT License
185 stars 38 forks source link

fix(response): refactor timeout and writer functions and tests #64

Closed appleboy closed 1 year ago

appleboy commented 1 year ago

fixed by @jeff-lyu

ref: https://github.com/gin-contrib/timeout/pull/52 fixed https://github.com/gin-contrib/timeout/issues/31

codecov-commenter commented 1 year ago

Codecov Report

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

Comparison is base (7452411) 92.68% compared to head (f5099f9) 95.12%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #64 +/- ## ========================================== + Coverage 92.68% 95.12% +2.43% ========================================== Files 4 4 Lines 123 123 ========================================== + Hits 114 117 +3 + Misses 6 4 -2 + Partials 3 2 -1 ``` | [Flag](https://app.codecov.io/gh/gin-contrib/timeout/pull/64/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gin-contrib) | Coverage Δ | | |---|---|---| | [go-](https://app.codecov.io/gh/gin-contrib/timeout/pull/64/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gin-contrib) | `95.12% <100.00%> (+2.43%)` | :arrow_up: | | [go-1.18](https://app.codecov.io/gh/gin-contrib/timeout/pull/64/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gin-contrib) | `92.68% <100.00%> (ø)` | | | [go-1.19](https://app.codecov.io/gh/gin-contrib/timeout/pull/64/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gin-contrib) | `95.12% <100.00%> (+2.43%)` | :arrow_up: | | [go-1.20](https://app.codecov.io/gh/gin-contrib/timeout/pull/64/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gin-contrib) | `90.24% <100.00%> (-2.44%)` | :arrow_down: | | [go-1.21](https://app.codecov.io/gh/gin-contrib/timeout/pull/64/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gin-contrib) | `90.24% <100.00%> (-2.44%)` | :arrow_down: | | [macos-latest](https://app.codecov.io/gh/gin-contrib/timeout/pull/64/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gin-contrib) | `95.12% <100.00%> (+2.43%)` | :arrow_up: | | [ubuntu-latest](https://app.codecov.io/gh/gin-contrib/timeout/pull/64/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gin-contrib) | `95.12% <100.00%> (+2.43%)` | :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=gin-contrib#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.