File tree 4 files changed +8
-8
lines changed
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -126,9 +126,9 @@ type token struct{}
126
126
type throttler struct {
127
127
tokens chan token
128
128
backlogTokens chan token
129
+ retryAfterFn func (ctxDone bool ) time.Duration
129
130
backlogTimeout time.Duration
130
131
statusCode int
131
- retryAfterFn func (ctxDone bool ) time.Duration
132
132
}
133
133
134
134
// setRetryAfterHeaderIfNeeded sets Retry-After HTTP header if corresponding retryAfterFn option of throttler is initialized.
Original file line number Diff line number Diff line change @@ -73,10 +73,10 @@ type WrapResponseWriter interface {
73
73
// http.ResponseWriter interface.
74
74
type basicWriter struct {
75
75
http.ResponseWriter
76
- wroteHeader bool
76
+ tee io. Writer
77
77
code int
78
78
bytes int
79
- tee io. Writer
79
+ wroteHeader bool
80
80
discard bool
81
81
}
82
82
Original file line number Diff line number Diff line change @@ -644,11 +644,11 @@ func TestMuxHandlePatternValidation(t *testing.T) {
644
644
testCases := []struct {
645
645
name string
646
646
pattern string
647
+ method string
648
+ path string
649
+ expectedBody string
650
+ expectedStatus int
647
651
shouldPanic bool
648
- method string // Method to be used for the test request
649
- path string // Path to be used for the test request
650
- expectedBody string // Expected response body
651
- expectedStatus int // Expected HTTP status code
652
652
}{
653
653
// Valid patterns
654
654
{
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ func TestPathValue(t *testing.T) {
15
15
name string
16
16
pattern string
17
17
method string
18
- pathKeys []string
19
18
requestPath string
20
19
expectedBody string
20
+ pathKeys []string
21
21
}{
22
22
{
23
23
name : "Basic path value" ,
You can’t perform that action at this time.
0 commit comments