Skip to content

Commit

Permalink
Simplify current span key declaration
Browse files Browse the repository at this point in the history
No need for a block.
  • Loading branch information
jmacd authored and krnowak committed Jan 30, 2020
1 parent 3aadb4d commit 1f18a73
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions api/trace/current.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ import (

type currentSpanKeyType struct{}

var (
currentSpanKey = &currentSpanKeyType{}
)
var currentSpanKey = &currentSpanKeyType{}

func ContextWithSpan(ctx context.Context, span Span) context.Context {
return context.WithValue(ctx, currentSpanKey, span)
Expand Down

0 comments on commit 1f18a73

Please sign in to comment.