浏览代码

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
mlboy 4 年之前
父节点
当前提交
029fd3ea35
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      core/trace/tracespec/vars.go

+ 5 - 1
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