Переглянути джерело

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