|
|
@@ -64,7 +64,6 @@ package trace // import "golang.org/x/net/trace"
|
|
|
|
|
|
import (
|
|
|
"bytes"
|
|
|
- "context"
|
|
|
"fmt"
|
|
|
"html/template"
|
|
|
"io"
|
|
|
@@ -271,18 +270,6 @@ type contextKeyT string
|
|
|
|
|
|
var contextKey = contextKeyT("golang.org/x/net/trace.Trace")
|
|
|
|
|
|
-// NewContext returns a copy of the parent context
|
|
|
-// and associates it with a Trace.
|
|
|
-func NewContext(ctx context.Context, tr Trace) context.Context {
|
|
|
- return context.WithValue(ctx, contextKey, tr)
|
|
|
-}
|
|
|
-
|
|
|
-// FromContext returns the Trace bound to the context, if any.
|
|
|
-func FromContext(ctx context.Context) (tr Trace, ok bool) {
|
|
|
- tr, ok = ctx.Value(contextKey).(Trace)
|
|
|
- return
|
|
|
-}
|
|
|
-
|
|
|
// Trace represents an active request.
|
|
|
type Trace interface {
|
|
|
// LazyLog adds x to the event log. It will be evaluated each time the
|