Skip to content

Commit 34717b7

Browse files
authored
fix some typos (#2603)
Signed-off-by: teslaedison <[email protected]>
1 parent fa70db8 commit 34717b7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ func (c *context) SetParamNames(names ...string) {
335335

336336
if len(c.pvalues) < l {
337337
// Keeping the old pvalues just for backward compatibility, but it sounds that doesn't make sense to keep them,
338-
// probably those values will be overriden in a Context#SetParamValues
338+
// probably those values will be overridden in a Context#SetParamValues
339339
newPvalues := make([]string, l)
340340
copy(newPvalues, c.pvalues)
341341
c.pvalues = newPvalues

echo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func (e *Echo) Routers() map[string]*Router {
419419
//
420420
// NOTE: In case errors happens in middleware call-chain that is returning from handler (which did not return an error).
421421
// When handler has already sent response (ala c.JSON()) and there is error in middleware that is returning from
422-
// handler. Then the error that global error handler received will be ignored because we have already "commited" the
422+
// handler. Then the error that global error handler received will be ignored because we have already "committed" the
423423
// response and status code header has been sent to the client.
424424
func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
425425

ip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ XFF: "x" "x, a" "x, a, b"
6464
```
6565
6666
In this case, use **first _untrustable_ IP reading from right**. Never use first one reading from left, as it is
67-
configurable by client. Here "trustable" means "you are sure the IP address belongs to your infrastructre".
67+
configurable by client. Here "trustable" means "you are sure the IP address belongs to your infrastructure".
6868
In above example, if `b` and `c` are trustable, the IP address of the client is `a` for both cases, never be `x`.
6969
7070
In Echo, use `ExtractIPFromXFFHeader(...TrustOption)`.

middleware/request_logger_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func TestRequestLogger_LogValuesFuncError(t *testing.T) {
194194
e.ServeHTTP(rec, req)
195195

196196
// NOTE: when global error handler received error returned from middleware the status has already
197-
// been written to the client and response has been "commited" therefore global error handler does not do anything
197+
// been written to the client and response has been "committed" therefore global error handler does not do anything
198198
// and error that bubbled up in middleware chain will not be reflected in response code.
199199
assert.Equal(t, http.StatusTeapot, rec.Code)
200200
assert.Equal(t, http.StatusTeapot, expect.Status)

0 commit comments

Comments
 (0)