Skip to content

Commit

Permalink
net: avoid allocation for trace context
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbarsky committed Jul 31, 2019
1 parent ca1201d commit a6d51a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ func lookupBucket(fam string, b int) *traceBucket {
return f.Buckets[b]
}

type contextKeyT string
type contextKeyT struct{}

var contextKey = contextKeyT("golang.org/x/net/trace.Trace")
var contextKey contextKeyT

// Trace represents an active request.
type Trace interface {
Expand Down

0 comments on commit a6d51a4

Please sign in to comment.