diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2018-08-09 23:29:20 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2018-08-09 23:43:59 +0100 |
commit | 347c11ec42264c579eb3f19494e4f75ab8bb8f0d (patch) | |
tree | 0171d2a9bcd67e7b9f6a78bbf6af4627e59f5aa1 /vendor/golang.org/x | |
parent | 9f8f0194a3c21e640a5b917f86bf204c014d730d (diff) |
Remove gRPC
This hasn't been enabled in a while due to gRPC limitations
Diffstat (limited to 'vendor/golang.org/x')
-rw-r--r-- | vendor/golang.org/x/net/trace/trace.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/trace/trace.go b/vendor/golang.org/x/net/trace/trace.go index a46ee0e..f00d869 100644 --- a/vendor/golang.org/x/net/trace/trace.go +++ b/vendor/golang.org/x/net/trace/trace.go @@ -70,6 +70,7 @@ import ( "log" "net" "net/http" + "net/url" "runtime" "sort" "strconv" @@ -110,6 +111,13 @@ var AuthRequest = func(req *http.Request) (any, sensitive bool) { } func init() { + _, pat := http.DefaultServeMux.Handler(&http.Request{URL: &url.URL{Path: "/debug/requests"}}) + if pat != "" { + panic("/debug/requests is already registered. You may have two independent copies of " + + "golang.org/x/net/trace in your binary, trying to maintain separate state. This may " + + "involve a vendored copy of golang.org/x/net/trace.") + } + // TODO(jbd): Serve Traces from /debug/traces in the future? // There is no requirement for a request to be present to have traces. http.HandleFunc("/debug/requests", Traces) |