[#114] simplified some code by returning early and added cap for slices

This commit is contained in:
Valley authored and GitHub committed 2022-07-14 19:26:08 +03:00
1 parent 03a7bafa66
commit a16b0c9004
11 files changed
+124 -147

No files matched your search

+1 -1
View File
@@ -48,7 +48,7 @@ func (scenario *ApiScenario) Test(t *testing.T) {
recorder := httptest.NewRecorder()
req := httptest.NewRequest(scenario.Method, scenario.Url, scenario.Body)
// add middeware to timeout long running requests (eg. keep-alive routes)
// add middleware to timeout long-running requests (eg. keep-alive routes)
e.Pre(func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
ctx, cancelFunc := context.WithTimeout(c.Request().Context(), 100*time.Millisecond)