package goctk

import "context"

type contextKey int

const key contextKey = 0

func NewContext(ctx context.Context, c *Client) context.Context {
	return context.WithValue(ctx, key, c)
}

func FromContext(ctx context.Context) *Client {
	return ctx.Value(key).(*Client)
}
