mirror of
https://github.com/labstack/echo.git
synced 2025-01-12 01:22:21 +02:00
apply go fmt (#1788)
This commit is contained in:
parent
45870c75c3
commit
d9e235416d
@ -247,7 +247,6 @@ func TestProxyRewriteRegex(t *testing.T) {
|
|||||||
{"/y/foo/bar", http.StatusOK, "/v5/bar/foo"},
|
{"/y/foo/bar", http.StatusOK, "/v5/bar/foo"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
t.Run(tc.requestPath, func(t *testing.T) {
|
t.Run(tc.requestPath, func(t *testing.T) {
|
||||||
req.URL, _ = url.Parse(tc.requestPath)
|
req.URL, _ = url.Parse(tc.requestPath)
|
||||||
|
@ -163,12 +163,12 @@ func TestEchoRewriteWithRegexRules(t *testing.T) {
|
|||||||
{"/y/foo/bar", "/v5/bar/foo"},
|
{"/y/foo/bar", "/v5/bar/foo"},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
t.Run(tc.requestPath, func(t *testing.T) {
|
t.Run(tc.requestPath, func(t *testing.T) {
|
||||||
req = httptest.NewRequest(http.MethodGet, tc.requestPath, nil)
|
req = httptest.NewRequest(http.MethodGet, tc.requestPath, nil)
|
||||||
rec = httptest.NewRecorder()
|
rec = httptest.NewRecorder()
|
||||||
e.ServeHTTP(rec, req)
|
e.ServeHTTP(rec, req)
|
||||||
assert.Equal(t, tc.expectPath, req.URL.EscapedPath())
|
assert.Equal(t, tc.expectPath, req.URL.EscapedPath())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user