From 7c6dedd5cc263e41a76769c46ecd97280e8448a6 Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik <93182827+NikitaSkrynnik@users.noreply.github.com> Date: Tue, 26 Dec 2023 18:55:50 +1100 Subject: [PATCH] [qfix] Use clearer function name in `extend` package (#1554) * Use clearer function name in extend package Signed-off-by: NikitaSkrynnik * fix golang linter Signed-off-by: NikitaSkrynnik --------- Signed-off-by: NikitaSkrynnik --- pkg/registry/common/begin/nse_event_factory.go | 2 +- pkg/tools/extend/extended.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/registry/common/begin/nse_event_factory.go b/pkg/registry/common/begin/nse_event_factory.go index 16d4179b4..b325e2a6b 100644 --- a/pkg/registry/common/begin/nse_event_factory.go +++ b/pkg/registry/common/begin/nse_event_factory.go @@ -202,7 +202,7 @@ func (f *eventNSEFactoryServer) Unregister(opts ...Option) <-chan error { default: ctx, cancel := f.ctxFunc() defer cancel() - _, err := f.server.Unregister(extend.WithJoinedValues(ctx, o.extendContext), f.registration) + _, err := f.server.Unregister(extend.WithBothValuesFromContext(ctx, o.extendContext), f.registration) f.afterCloseFunc() ch <- err } diff --git a/pkg/tools/extend/extended.go b/pkg/tools/extend/extended.go index 2255e4a3b..e15fed0e7 100644 --- a/pkg/tools/extend/extended.go +++ b/pkg/tools/extend/extended.go @@ -51,8 +51,8 @@ func WithValuesFromContext(parent, valuesContext context.Context) context.Contex } } -// WithJoinedValues - creates a child context with the Values from both parent and values Contexts -func WithJoinedValues(parent, valuesContext context.Context) context.Context { +// WithBothValuesFromContext - creates a child context with the Values from both parent and values Contexts +func WithBothValuesFromContext(parent, valuesContext context.Context) context.Context { return &joinedValuesContext{ Context: parent, valuesContext: valuesContext,