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

fallback handler #84

Merged
merged 1 commit into from
Oct 4, 2023
Merged

fallback handler #84

merged 1 commit into from
Oct 4, 2023

Conversation

cpunion
Copy link
Contributor

@cpunion cpunion commented Oct 3, 2023

No description provided.

@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (ce268f1) 75.79% compared to head (de1036c) 75.79%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #84   +/-   ##
=======================================
  Coverage   75.79%   75.79%           
=======================================
  Files          17       17           
  Lines        1128     1128           
=======================================
  Hits          855      855           
  Misses        242      242           
  Partials       31       31           

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


// Fallback is a http.Handler that fallback to second handler if status code of
// first handler is in fallbackStatus
func Fallback(fallbackStatus []int, first http.Handler, second http.Handler) http.Handler {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe Fallback => New is better?

}

type fallbackWriter struct {
open bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bool field usually is defined at the end

@xushiwei xushiwei merged commit 817c137 into qiniu:main Oct 4, 2023
11 checks passed
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