Skip to content

Commit ae0f7d3

Browse files
jmacdkrnowak
jmacd
authored andcommitted
Simplify current span key declaration
No need for a block.
1 parent 648289e commit ae0f7d3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

api/trace/current.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ import (
2020

2121
type currentSpanKeyType struct{}
2222

23-
var (
24-
currentSpanKey = &currentSpanKeyType{}
25-
)
23+
var currentSpanKey = &currentSpanKeyType{}
2624

2725
func ContextWithSpan(ctx context.Context, span Span) context.Context {
2826
return context.WithValue(ctx, currentSpanKey, span)

0 commit comments

Comments
 (0)