Skip to content

Commit 712b5e4

Browse files
vkdvishr
authored andcommitted
format code (gofmt + trim trailing space) (#1452)
1 parent 8d7f05e commit 712b5e4

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

context_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"encoding/xml"
88
"errors"
99
"fmt"
10-
"github.com/labstack/gommon/log"
1110
"io"
1211
"math"
1312
"mime/multipart"
@@ -19,6 +18,7 @@ import (
1918
"text/template"
2019
"time"
2120

21+
"github.com/labstack/gommon/log"
2222
testify "github.com/stretchr/testify/assert"
2323
)
2424

middleware/cors_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestCORS(t *testing.T) {
7373
c = e.NewContext(req, rec)
7474
req.Header.Set(echo.HeaderOrigin, "http://aaa.example.com")
7575
cors = CORSWithConfig(CORSConfig{
76-
AllowOrigins: []string{"http://*.example.com"},
76+
AllowOrigins: []string{"http://*.example.com"},
7777
})
7878
h = cors(echo.NotFoundHandler)
7979
h(c)

middleware/jwt.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type (
2525
// ErrorHandler defines a function which is executed for an invalid token.
2626
// It may be used to define a custom JWT error.
2727
ErrorHandler JWTErrorHandler
28-
28+
2929
// ErrorHandlerWithContext is almost identical to ErrorHandler, but it's passed the current context.
3030
ErrorHandlerWithContext JWTErrorHandlerWithContext
3131

@@ -74,7 +74,7 @@ type (
7474

7575
// JWTErrorHandlerWithContext is almost identical to JWTErrorHandler, but it's passed the current context.
7676
JWTErrorHandlerWithContext func(error, echo.Context) error
77-
77+
7878
jwtExtractor func(echo.Context) (string, error)
7979
)
8080

@@ -183,7 +183,7 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
183183
if config.ErrorHandler != nil {
184184
return config.ErrorHandler(err)
185185
}
186-
186+
187187
if config.ErrorHandlerWithContext != nil {
188188
return config.ErrorHandlerWithContext(err, c)
189189
}
@@ -210,7 +210,7 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
210210
return config.ErrorHandler(err)
211211
}
212212
if config.ErrorHandlerWithContext != nil {
213-
return config.ErrorHandlerWithContext(err, c)
213+
return config.ErrorHandlerWithContext(err, c)
214214
}
215215
return &echo.HTTPError{
216216
Code: http.StatusUnauthorized,

middleware/jwt_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func TestJWT(t *testing.T) {
205205
req.Header.Set(echo.HeaderCookie, tc.hdrCookie)
206206
c := e.NewContext(req, res)
207207

208-
if tc.reqURL == "/" + token {
208+
if tc.reqURL == "/"+token {
209209
c.SetParamNames("jwt")
210210
c.SetParamValues(token)
211211
}

0 commit comments

Comments
 (0)