diff --git a/pkg/source/source.go b/pkg/source/source.go index b88abd7b81..26e53022bf 100644 --- a/pkg/source/source.go +++ b/pkg/source/source.go @@ -69,8 +69,8 @@ var _ Source = &channel[string]{} // ChannelOpt allows to configure a source.Channel. type ChannelOpt[T any] func(*channel[T]) -// WithPrededicates adds the configured predicates to a source.Channel. -func WithPrededicates[T any](p ...predicate.TypedPredicate[T]) ChannelOpt[T] { +// WithPredicates adds the configured predicates to a source.Channel. +func WithPredicates[T any](p ...predicate.TypedPredicate[T]) ChannelOpt[T] { return func(c *channel[T]) { c.predicates = append(c.predicates, p...) } diff --git a/pkg/source/source_test.go b/pkg/source/source_test.go index 9b53b90503..d30d5ae5c7 100644 --- a/pkg/source/source_test.go +++ b/pkg/source/source_test.go @@ -318,7 +318,7 @@ var _ = Describe("Source", func() { close(c) }, }, - source.WithPrededicates(prct), + source.WithPredicates(prct), ) err := instance.Start(ctx, q) Expect(err).NotTo(HaveOccurred())