Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
lovromazgon committed Jan 31, 2025
1 parent 3162f45 commit 24815aa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions destination_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import (
"golang.org/x/time/rate"
)

var destinationMiddlewareType = reflect.TypeFor[DestinationMiddleware]()

// DestinationMiddleware wraps a Destination and adds functionality to it.
type DestinationMiddleware interface {
Wrap(Destination) Destination
Expand Down Expand Up @@ -116,7 +114,6 @@ func destinationMiddlewareFromConfigRecursive(cfgVal reflect.Value) []Destinatio
}

switch {

case field.Type().Implements(destinationMiddlewareType):
// This is a middleware config, store it.
//nolint:forcetypeassert // type checked above with field.Type().Implements()
Expand All @@ -126,7 +123,6 @@ func destinationMiddlewareFromConfigRecursive(cfgVal reflect.Value) []Destinatio
cfgType.Field(i).Type.Kind() == reflect.Struct:
// This is an embedded struct, dive deeper.
mw = append(mw, destinationMiddlewareFromConfigRecursive(field.Elem())...)

}
}

Expand Down
2 changes: 0 additions & 2 deletions source_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ func sourceMiddlewareFromConfigRecursive(cfgVal reflect.Value) []SourceMiddlewar
}

switch {

case field.Type().Implements(sourceMiddlewareType):
// This is a middleware config, store it.
//nolint:forcetypeassert // type checked above with field.Type().Implements()
Expand All @@ -120,7 +119,6 @@ func sourceMiddlewareFromConfigRecursive(cfgVal reflect.Value) []SourceMiddlewar
cfgType.Field(i).Type.Kind() == reflect.Struct:
// This is an embedded struct, dive deeper.
mw = append(mw, sourceMiddlewareFromConfigRecursive(field.Elem())...)

}
}

Expand Down

0 comments on commit 24815aa

Please sign in to comment.