From cf717aa2257cf4a55a04d74cc447eae80e6769f6 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Sun, 10 Nov 2019 10:38:39 +0100 Subject: [PATCH] make context keys a single integral type --- api/distributedcontext/context.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/api/distributedcontext/context.go b/api/distributedcontext/context.go index 2cb7c88b64a..588ca30075a 100644 --- a/api/distributedcontext/context.go +++ b/api/distributedcontext/context.go @@ -18,14 +18,11 @@ import ( "context" ) -type ( - ctxCorrelationsType struct{} - ctxBaggageType struct{} -) +type ctxKey int -var ( - ctxCorrelationsKey = &ctxCorrelationsType{} - ctxBaggageKey = &ctxBaggageType{} +const ( + ctxCorrelationsKey ctxKey = iota + ctxBaggageKey ) func NewCorrelationsContextKV(ctx context.Context, correlations ...Correlation) context.Context {