Skip to content

Commit 3950c44

Browse files
authored
fix some typos (#2511)
1 parent 77d5ae6 commit 3950c44

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

middleware/context_timeout.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type ContextTimeoutConfig struct {
1313
// Skipper defines a function to skip middleware.
1414
Skipper Skipper
1515

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

1919
// Timeout configures a timeout for the middleware, defaults to 0 for no timeout

middleware/proxy_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func TestProxyRealIPHeader(t *testing.T) {
188188
tests := []*struct {
189189
hasRealIPheader bool
190190
hasIPExtractor bool
191-
extectedXRealIP string
191+
expectedXRealIP string
192192
}{
193193
{false, false, remoteAddrIP},
194194
{false, true, extractedRealIP},
@@ -210,7 +210,7 @@ func TestProxyRealIPHeader(t *testing.T) {
210210
e.IPExtractor = nil
211211
}
212212
e.ServeHTTP(rec, req)
213-
assert.Equal(t, tt.extectedXRealIP, req.Header.Get(echo.HeaderXRealIP), "hasRealIPheader: %t / hasIPExtractor: %t", tt.hasRealIPheader, tt.hasIPExtractor)
213+
assert.Equal(t, tt.expectedXRealIP, req.Header.Get(echo.HeaderXRealIP), "hasRealIPheader: %t / hasIPExtractor: %t", tt.hasRealIPheader, tt.hasIPExtractor)
214214
}
215215
}
216216

0 commit comments

Comments
 (0)