Skip to content

Commit

Permalink
fix some typos (#2511)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiei114 authored Sep 13, 2023
1 parent 77d5ae6 commit 3950c44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion middleware/context_timeout.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ContextTimeoutConfig struct {
// Skipper defines a function to skip middleware.
Skipper Skipper

// ErrorHandler is a function when error aries in middeware execution.
// ErrorHandler is a function when error aries in middleware execution.
ErrorHandler func(err error, c echo.Context) error

// Timeout configures a timeout for the middleware, defaults to 0 for no timeout
Expand Down
4 changes: 2 additions & 2 deletions middleware/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func TestProxyRealIPHeader(t *testing.T) {
tests := []*struct {
hasRealIPheader bool
hasIPExtractor bool
extectedXRealIP string
expectedXRealIP string
}{
{false, false, remoteAddrIP},
{false, true, extractedRealIP},
Expand All @@ -210,7 +210,7 @@ func TestProxyRealIPHeader(t *testing.T) {
e.IPExtractor = nil
}
e.ServeHTTP(rec, req)
assert.Equal(t, tt.extectedXRealIP, req.Header.Get(echo.HeaderXRealIP), "hasRealIPheader: %t / hasIPExtractor: %t", tt.hasRealIPheader, tt.hasIPExtractor)
assert.Equal(t, tt.expectedXRealIP, req.Header.Get(echo.HeaderXRealIP), "hasRealIPheader: %t / hasIPExtractor: %t", tt.hasRealIPheader, tt.hasIPExtractor)
}
}

Expand Down

0 comments on commit 3950c44

Please sign in to comment.