Skip to content

Conversation

@appleboy
Copy link
Member

@appleboy appleboy commented Nov 25, 2023

  • Modify the New function in timeout.go to include a new line of code
  • Delete the WriteHeader function in writer.go
  • Add a new line of code to the WriteHeader function in writer.go
  • Add a new test case to the TestWriter_Status function in writer_test.go
  • Add a new function testNew to writer_test.go
  • Add a new function timeoutHandler to writer_test.go
  • Add a new test case to the TestHTTPStatusCode function in writer_test.go

fixed by @jeff-lyu

ref: #52
fixed #31

- Modify the `New` function in `timeout.go` to include a new line of code
- Delete the `WriteHeader` function in `writer.go`
- Add a new line of code to the `WriteHeader` function in `writer.go`
- Add a new test case to the `TestWriter_Status` function in `writer_test.go`
- Add a new function `testNew` to `writer_test.go`
- Add a new function `timeoutHandler` to `writer_test.go`
- Add a new test case to the `TestHTTPStatusCode` function in `writer_test.go`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

Additional details and impacted files
@@            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 Coverage Δ
go- 95.12% <100.00%> (+2.43%) ⬆️
go-1.18 92.68% <100.00%> (ø)
go-1.19 95.12% <100.00%> (+2.43%) ⬆️
go-1.20 90.24% <100.00%> (-2.44%) ⬇️
go-1.21 90.24% <100.00%> (-2.44%) ⬇️
macos-latest 95.12% <100.00%> (+2.43%) ⬆️
ubuntu-latest 95.12% <100.00%> (+2.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@appleboy appleboy added the bug Something isn't working label Nov 25, 2023
@appleboy appleboy merged commit f338d36 into master Nov 25, 2023
@appleboy appleboy deleted the bugs branch November 25, 2023 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP Code 204 is not properly handled

3 participants