From 9fb4913ac8664cb26efc175fb35066b55f404eb2 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Mon, 22 Apr 2024 20:26:23 +0200 Subject: [PATCH] Fix typo in channel option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- pkg/source/source.go | 4 ++-- pkg/source/source_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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())