소스 검색

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