use package level defined contextKey as context key

This commit is contained in:
kevin
2020-09-20 12:46:35 +08:00
parent dc17855367
commit 86d3de4c89
3 changed files with 14 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
package tracespec
// TracingKey is tracing key for context
var TracingKey = contextKey("X-Trace")
// contextKey a type for context key
type contextKey string
// Printing a context will reveal a fair amount of information about it.
func (c contextKey) String() string {
return "trace/tracespec context key " + string(c)
}