diff --git a/client/context.go b/client/context.go deleted file mode 100644 index 4cb496f0..00000000 --- a/client/context.go +++ /dev/null @@ -1,16 +0,0 @@ -package client - -import ( - "context" -) - -type clientKey struct{} - -func FromContext(ctx context.Context) (Client, bool) { - c, ok := ctx.Value(clientKey{}).(Client) - return c, ok -} - -func NewContext(ctx context.Context, c Client) context.Context { - return context.WithValue(ctx, clientKey{}, c) -} diff --git a/server/context.go b/server/context.go deleted file mode 100644 index fdd9ff75..00000000 --- a/server/context.go +++ /dev/null @@ -1,16 +0,0 @@ -package server - -import ( - "context" -) - -type serverKey struct{} - -func FromContext(ctx context.Context) (Server, bool) { - c, ok := ctx.Value(serverKey{}).(Server) - return c, ok -} - -func NewContext(ctx context.Context, s Server) context.Context { - return context.WithValue(ctx, serverKey{}, s) -}