File tree 4 files changed +13
-13
lines changed
4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -119,9 +119,9 @@ func CSRFWithConfig(config CSRFConfig) echo.MiddlewareFunc {
119
119
config .CookieSecure = true
120
120
}
121
121
122
- extractors , err := CreateExtractors (config .TokenLookup )
123
- if err != nil {
124
- panic (err )
122
+ extractors , cErr := CreateExtractors (config .TokenLookup )
123
+ if cErr != nil {
124
+ panic (cErr )
125
125
}
126
126
127
127
return func (next echo.HandlerFunc ) echo.HandlerFunc {
Original file line number Diff line number Diff line change @@ -196,9 +196,9 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
196
196
config .ParseTokenFunc = config .defaultParseToken
197
197
}
198
198
199
- extractors , err := createExtractors (config .TokenLookup , config .AuthScheme )
200
- if err != nil {
201
- panic (err )
199
+ extractors , cErr := createExtractors (config .TokenLookup , config .AuthScheme )
200
+ if cErr != nil {
201
+ panic (cErr )
202
202
}
203
203
if len (config .TokenLookupFuncs ) > 0 {
204
204
extractors = append (config .TokenLookupFuncs , extractors ... )
Original file line number Diff line number Diff line change @@ -108,9 +108,9 @@ func KeyAuthWithConfig(config KeyAuthConfig) echo.MiddlewareFunc {
108
108
panic ("echo: key-auth middleware requires a validator function" )
109
109
}
110
110
111
- extractors , err := createExtractors (config .KeyLookup , config .AuthScheme )
112
- if err != nil {
113
- panic (err )
111
+ extractors , cErr := createExtractors (config .KeyLookup , config .AuthScheme )
112
+ if cErr != nil {
113
+ panic (cErr )
114
114
}
115
115
116
116
return func (next echo.HandlerFunc ) echo.HandlerFunc {
Original file line number Diff line number Diff line change @@ -157,9 +157,9 @@ func StaticWithConfig(config StaticConfig) echo.MiddlewareFunc {
157
157
}
158
158
159
159
// Index template
160
- t , err := template .New ("index" ).Parse (html )
161
- if err != nil {
162
- panic (fmt .Sprintf ("echo: %v " , err ))
160
+ t , tErr := template .New ("index" ).Parse (html )
161
+ if tErr != nil {
162
+ panic (fmt .Errorf ("echo: %w " , tErr ))
163
163
}
164
164
165
165
return func (next echo.HandlerFunc ) echo.HandlerFunc {
@@ -176,7 +176,7 @@ func StaticWithConfig(config StaticConfig) echo.MiddlewareFunc {
176
176
if err != nil {
177
177
return
178
178
}
179
- name := filepath .Join (config .Root , filepath .Clean ("/" + p )) // "/"+ for security
179
+ name := filepath .Join (config .Root , path .Clean ("/" + p )) // "/"+ for security
180
180
181
181
if config .IgnoreBase {
182
182
routePath := path .Base (strings .TrimRight (c .Path (), "/*" ))
You can’t perform that action at this time.
0 commit comments