瀏覽代碼

use contextType as string type

kevin 4 年之前
父節點
當前提交
1606a92c6e
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      core/trace/tracespec/vars.go

+ 4 - 4
core/trace/tracespec/vars.go

@@ -1,7 +1,7 @@
 package tracespec
 
-//ContextKey a type for context key
-type ContextKey struct{}
+// contextKey a type for context key
+type contextKey string
 
-//TracingKey is tracing key for ctx
-var TracingKey ContextKey
+// TracingKey is tracing key for context
+var TracingKey = contextKey("X-Trace")