Skip to content
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

refactor: refactor timeout handling in timeout.go and timeout_test.go #62

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

appleboy
Copy link
Member

  • Remove the import statement for "context" in timeout.go
  • Remove the code block related to context cancellation in the New function in timeout.go
  • Replace the case statement in the New function in timeout.go with a case statement using time.After
  • Remove the import statement for "sync" in timeout_test.go
  • Remove the TestDeadlineExceeded function in timeout_test.go

reverted PR #54

- Remove the import statement for "context" in timeout.go
- Remove the code block related to context cancellation in the New function in timeout.go
- Replace the case statement in the New function in timeout.go with a case statement using time.After
- Remove the import statement for "sync" in timeout_test.go
- Remove the TestDeadlineExceeded function in timeout_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 (df5d291) 92.91% compared to head (f1ccf97) 94.91%.
Report is 4 commits behind head on master.

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
+ Coverage   92.91%   94.91%   +2.00%     
==========================================
  Files           4        4              
  Lines         127      118       -9     
==========================================
- Hits          118      112       -6     
+ Misses          6        4       -2     
+ Partials        3        2       -1     
Flag Coverage Δ
go- 94.91% <100.00%> (?)
go-1.18 94.91% <100.00%> (+2.00%) ⬆️
go-1.19 94.91% <100.00%> (+2.00%) ⬆️
go-1.20 94.91% <100.00%> (?)
go-1.21 89.83% <100.00%> (?)
macos-latest 94.91% <100.00%> (?)
ubuntu-latest 94.91% <100.00%> (+2.00%) ⬆️

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 merged commit f2805fd into master Nov 25, 2023
8 checks passed
@appleboy appleboy deleted the PR54 branch November 25, 2023 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants