From ae0f7d3f12232f9876b6d65ddd591ac1d6c1d9b9 Mon Sep 17 00:00:00 2001 From: jmacd Date: Fri, 17 Jan 2020 18:29:26 +0100 Subject: [PATCH] Simplify current span key declaration No need for a block. --- api/trace/current.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/api/trace/current.go b/api/trace/current.go index c1ad829dcde1..55cd2d56528d 100644 --- a/api/trace/current.go +++ b/api/trace/current.go @@ -20,9 +20,7 @@ import ( type currentSpanKeyType struct{} -var ( - currentSpanKey = ¤tSpanKeyType{} -) +var currentSpanKey = ¤tSpanKeyType{} func ContextWithSpan(ctx context.Context, span Span) context.Context { return context.WithValue(ctx, currentSpanKey, span)