Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion middleware/throttle.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ type token struct{}
type throttler struct {
tokens chan token
backlogTokens chan token
retryAfterFn func(ctxDone bool) time.Duration
backlogTimeout time.Duration
statusCode int
retryAfterFn func(ctxDone bool) time.Duration
}

// setRetryAfterHeaderIfNeeded sets Retry-After HTTP header if corresponding retryAfterFn option of throttler is initialized.
Expand Down
4 changes: 2 additions & 2 deletions middleware/wrap_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ type WrapResponseWriter interface {
// http.ResponseWriter interface.
type basicWriter struct {
http.ResponseWriter
wroteHeader bool
tee io.Writer
code int
bytes int
tee io.Writer
wroteHeader bool
discard bool
}

Expand Down
8 changes: 4 additions & 4 deletions mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,11 +644,11 @@ func TestMuxHandlePatternValidation(t *testing.T) {
testCases := []struct {
name string
pattern string
method string
path string
expectedBody string
expectedStatus int
shouldPanic bool
method string // Method to be used for the test request
path string // Path to be used for the test request
expectedBody string // Expected response body
expectedStatus int // Expected HTTP status code
}{
// Valid patterns
{
Expand Down
2 changes: 1 addition & 1 deletion path_value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ func TestPathValue(t *testing.T) {
name string
pattern string
method string
pathKeys []string
requestPath string
expectedBody string
pathKeys []string
}{
{
name: "Basic path value",
Expand Down