Explorar el Código

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 hace 5 años
padre
commit
029fd3ea35
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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