Skip to content

Commit

Permalink
clean up old funcs
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Szwaj <[email protected]>
  • Loading branch information
cnvergence committed Feb 23, 2024
1 parent ee31348 commit 5dfa61a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
14 changes: 0 additions & 14 deletions internal/gatewayapi/contexts.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,17 +441,3 @@ func (b *BackendRefContext) GetBackendRef(routeKind gwapiv1.Kind) *gwapiv1.Backe
}
return nil

Check warning on line 442 in internal/gatewayapi/contexts.go

View check run for this annotation

Codecov / codecov/patch

internal/gatewayapi/contexts.go#L442

Added line #L442 was not covered by tests
}

func (b *BackendRefContext) GetHTTPFilters() []gwapiv1.HTTPRouteFilter {
if b.HTTPBackendRef != nil {
return b.HTTPBackendRef.Filters
}
return nil
}

func (b *BackendRefContext) GetGRPCFilters() []v1alpha2.GRPCRouteFilter {
if b.GRPCBackendRef != nil {
return b.GRPCBackendRef.Filters
}
return nil
}
4 changes: 2 additions & 2 deletions internal/gatewayapi/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ func (t *Translator) validateBackendRefFilters(backendRef BackendRefContext, par
var filtersLen int
switch routeKind {
case KindHTTPRoute:
filtersLen = len(backendRef.GetHTTPFilters())
filtersLen = len(backendRef.HTTPBackendRef.Filters)
case KindGRPCRoute:
filtersLen = len(backendRef.GetGRPCFilters())
filtersLen = len(backendRef.GRPCBackendRef.Filters)
default:
return true
}
Expand Down

0 comments on commit 5dfa61a

Please sign in to comment.