mirror of
https://github.com/labstack/echo.git
synced 2025-09-16 09:16:29 +02:00
chore: fix some typos in comment (#2735)
Signed-off-by: zhuhaicity <zhuhai@52it.net>
This commit is contained in:
2
bind.go
2
bind.go
@@ -269,7 +269,7 @@ func (b *DefaultBinder) bindData(destination interface{}, data map[string][]stri
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// we could be dealing with pointer to slice `*[]string` so dereference it. There are wierd OpenAPI generators
|
// we could be dealing with pointer to slice `*[]string` so dereference it. There are weird OpenAPI generators
|
||||||
// that could create struct fields like that.
|
// that could create struct fields like that.
|
||||||
if structFieldKind == reflect.Pointer {
|
if structFieldKind == reflect.Pointer {
|
||||||
structFieldKind = structField.Elem().Kind()
|
structFieldKind = structField.Elem().Kind()
|
||||||
|
2
ip.go
2
ip.go
@@ -24,7 +24,7 @@ To retrieve IP address reliably/securely, you must let your application be aware
|
|||||||
In Echo, this can be done by configuring `Echo#IPExtractor` appropriately.
|
In Echo, this can be done by configuring `Echo#IPExtractor` appropriately.
|
||||||
This guides show you why and how.
|
This guides show you why and how.
|
||||||
|
|
||||||
> Note: if you dont' set `Echo#IPExtractor` explicitly, Echo fallback to legacy behavior, which is not a good choice.
|
> Note: if you don't set `Echo#IPExtractor` explicitly, Echo fallback to legacy behavior, which is not a good choice.
|
||||||
|
|
||||||
Let's start from two questions to know the right direction:
|
Let's start from two questions to know the right direction:
|
||||||
|
|
||||||
|
@@ -191,7 +191,7 @@ NewRateLimiterMemoryStoreWithConfig returns an instance of RateLimiterMemoryStor
|
|||||||
with the provided configuration. Rate must be provided. Burst will be set to the rounded down value of
|
with the provided configuration. Rate must be provided. Burst will be set to the rounded down value of
|
||||||
the configured rate if not provided or set to 0.
|
the configured rate if not provided or set to 0.
|
||||||
|
|
||||||
The build-in memory store is usually capable for modest loads. For higher loads other
|
The built-in memory store is usually capable for modest loads. For higher loads other
|
||||||
store implementations should be considered.
|
store implementations should be considered.
|
||||||
|
|
||||||
Characteristics:
|
Characteristics:
|
||||||
|
@@ -2773,7 +2773,7 @@ func TestRouter_Routes(t *testing.T) {
|
|||||||
func TestRouter_addEmptyPathToSlashReverse(t *testing.T) {
|
func TestRouter_addEmptyPathToSlashReverse(t *testing.T) {
|
||||||
e := New()
|
e := New()
|
||||||
r := e.router
|
r := e.router
|
||||||
r.add(http.MethodGet, "", "empty", handlerFunc) // emtpy path is normalized to `/`
|
r.add(http.MethodGet, "", "empty", handlerFunc) // empty path is normalized to `/`
|
||||||
|
|
||||||
assert.Equal(t, "/", r.Reverse("empty"))
|
assert.Equal(t, "/", r.Reverse("empty"))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user