Skip to content

Commit

Permalink
make context keys a single integral type
Browse files Browse the repository at this point in the history
  • Loading branch information
krnowak committed Nov 10, 2019
1 parent bf731ef commit cf717aa
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions api/distributedcontext/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cf717aa

Please sign in to comment.