mirror of
https://github.com/labstack/echo.git
synced 2025-11-06 08:59:21 +02:00
format code (gofmt + trim trailing space) (#1452)
This commit is contained in:
committed by
Vishal Rana
parent
8d7f05e533
commit
712b5e46c5
@@ -7,7 +7,6 @@ import (
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/labstack/gommon/log"
|
||||
"io"
|
||||
"math"
|
||||
"mime/multipart"
|
||||
@@ -19,6 +18,7 @@ import (
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/labstack/gommon/log"
|
||||
testify "github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ func TestCORS(t *testing.T) {
|
||||
c = e.NewContext(req, rec)
|
||||
req.Header.Set(echo.HeaderOrigin, "http://aaa.example.com")
|
||||
cors = CORSWithConfig(CORSConfig{
|
||||
AllowOrigins: []string{"http://*.example.com"},
|
||||
AllowOrigins: []string{"http://*.example.com"},
|
||||
})
|
||||
h = cors(echo.NotFoundHandler)
|
||||
h(c)
|
||||
|
||||
@@ -210,7 +210,7 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
|
||||
return config.ErrorHandler(err)
|
||||
}
|
||||
if config.ErrorHandlerWithContext != nil {
|
||||
return config.ErrorHandlerWithContext(err, c)
|
||||
return config.ErrorHandlerWithContext(err, c)
|
||||
}
|
||||
return &echo.HTTPError{
|
||||
Code: http.StatusUnauthorized,
|
||||
|
||||
@@ -205,7 +205,7 @@ func TestJWT(t *testing.T) {
|
||||
req.Header.Set(echo.HeaderCookie, tc.hdrCookie)
|
||||
c := e.NewContext(req, res)
|
||||
|
||||
if tc.reqURL == "/" + token {
|
||||
if tc.reqURL == "/"+token {
|
||||
c.SetParamNames("jwt")
|
||||
c.SetParamValues(token)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user