From 029fd3ea35acb163b48d1e8cf7a99879508ea502 Mon Sep 17 00:00:00 2001 From: mlboy Date: Sun, 20 Sep 2020 12:01:43 +0800 Subject: [PATCH] fix: golint: context.WithValue should should not use basic type as key (#83) * fix: golint: context.WithValue should should not use basic type as key * optimiz --- core/trace/tracespec/vars.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/trace/tracespec/vars.go b/core/trace/tracespec/vars.go index 35a2ee18..6150800a 100644 --- a/core/trace/tracespec/vars.go +++ b/core/trace/tracespec/vars.go @@ -1,3 +1,7 @@ package tracespec -const TracingKey = "X-Trace" +//ContextKey a type for context key +type ContextKey struct{} + +//TracingKey is tracing key for ctx +var TracingKey ContextKey