-
Notifications
You must be signed in to change notification settings - Fork 38
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 bug: the result will be incorrect when call gin.Context.Writer.Status() in our custom gin middleware used after this middleware #46
Conversation
issue: #47 |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #46 +/- ##
==========================================
- Coverage 94.91% 92.91% -2.01%
==========================================
Files 4 4
Lines 118 127 +9
==========================================
+ Hits 112 118 +6
- Misses 4 6 +2
- Partials 2 3 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hey, this would solve a bug for us too, can we get an update on this ? |
…r.Status() is incorrect in other custom gin middlewares.
…bugfix # Conflicts: # timeout_test.go
@appleboy Hi, I added a unit test to cover this bug fix, hope to be reviewed. |
can't pass the testing @zhyee |
I created the PR #61 |
* refactor: remove unused code related to writer status - Remove the `strconv` import in `timeout_test.go` - Remove the `TestWriter_Status` test function in `timeout_test.go` - Remove the `Status` method in `writer.go` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * style: remove empty line in timeout_test.go - Remove an empty line in `timeout_test.go` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
consider this code: