1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

fix some typos (#2511)

This commit is contained in:
eiei114 2023-09-14 04:41:58 +09:00 committed by GitHub
parent 77d5ae6a91
commit 3950c444b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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},
@ -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)
}
}