Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Feb 12, 2025
1 parent 3ffa781 commit bf42cf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/actions/gc/action_gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ func (a *Action) run(ctx context.Context, rr *odhTypes.ReconciliationRequest) er
deleted, err := a.gc.Run(
ctx,
selector,
gc.WitTypeFilter(func(ctx context.Context, kind schema.GroupVersionKind) (bool, error) {
gc.WithTypeFilter(func(ctx context.Context, kind schema.GroupVersionKind) (bool, error) {
if slices.Contains(a.unremovables, kind) {
return false, nil
}

return a.typePredicateFn(rr, kind)
}),
gc.WitObjectFilter(func(ctx context.Context, obj unstructured.Unstructured) (bool, error) {
gc.WithObjectFilter(func(ctx context.Context, obj unstructured.Unstructured) (bool, error) {
if slices.Contains(a.unremovables, obj.GroupVersionKind()) {
return false, nil
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/services/gc/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ type runOptions struct {

type RunOptionsFn func(*runOptions)

func WitObjectFilter(fn func(context.Context, unstructured.Unstructured) (bool, error)) RunOptionsFn {
func WithObjectFilter(fn func(context.Context, unstructured.Unstructured) (bool, error)) RunOptionsFn {
return func(o *runOptions) {
o.objectPredicate = fn
}
}
func WitTypeFilter(fn func(context.Context, schema.GroupVersionKind) (bool, error)) RunOptionsFn {
func WithTypeFilter(fn func(context.Context, schema.GroupVersionKind) (bool, error)) RunOptionsFn {
return func(o *runOptions) {
o.typePredicate = fn
}
Expand Down

0 comments on commit bf42cf4

Please sign in to comment.