mirror of
https://github.com/docker/compose.git
synced 2026-08-04 14:47:40 +00:00
API Metrics : send context type, not context name
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
parent
fbe505f27f
commit
7807fb33cc
6 changed files with 45 additions and 23 deletions
|
|
@ -31,8 +31,8 @@ import (
|
|||
type clientKey struct{}
|
||||
|
||||
// WithClient adds the client to the context
|
||||
func WithClient(ctx context.Context, c *client.Client) (context.Context, error) {
|
||||
return context.WithValue(ctx, clientKey{}, c), nil
|
||||
func WithClient(ctx context.Context, c *client.Client) context.Context {
|
||||
return context.WithValue(ctx, clientKey{}, c)
|
||||
}
|
||||
|
||||
// Client returns the client from the context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue