Skip to content

Commit

Permalink
fix go lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jkaninda committed Jan 20, 2025
1 parent 49df9ae commit 4be81ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/check_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func checkConfig(routes []Route, middlewares []Middleware) error {
// find duplicated middleware name
duplicates, err := findDuplicateMiddlewareNames(dynamicMiddlewares)
if err != nil {
return fmt.Errorf(err.Error())
return fmt.Errorf("middlewre %v", err)
}
if len(duplicates) != 0 {
for _, duplicate := range duplicates {
Expand Down
2 changes: 1 addition & 1 deletion internal/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func findDuplicateMiddlewareNames(middlewares []Middleware) ([]string, error) {

for _, mid := range middlewares {
if mid.Name == "" {
return duplicates, fmt.Errorf("middlewre name should not be empty")
return duplicates, fmt.Errorf("name should not be empty")
}
nameMap[mid.Name]++
// If the count is ==2, it's a duplicate
Expand Down

0 comments on commit 4be81ad

Please sign in to comment.