Skip to content

Commit

Permalink
[qfix] Use clearer function name in extend package (#1554)
Browse files Browse the repository at this point in the history
* Use clearer function name in extend package

Signed-off-by: NikitaSkrynnik <nikita.skrynnik@xored.com>

* fix golang linter

Signed-off-by: NikitaSkrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NikitaSkrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik authored Dec 26, 2023
1 parent 429d553 commit 7c6dedd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/registry/common/begin/nse_event_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/tools/extend/extended.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7c6dedd

Please sign in to comment.