Skip to content

Commit

Permalink
Merge pull request #16 from dzbarsky/opt
Browse files Browse the repository at this point in the history
net: avoid allocation for trace context
  • Loading branch information
meslubi2021 authored Dec 13, 2024
2 parents 0b80a88 + a6d51a4 commit 37fbe80
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 37fbe80

Please sign in to comment.