소스 검색

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")