-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expvar: export http.Handler #15030
Labels
Milestone
Comments
Sure, feel free to send a change adding: // Handler returns the expvar HTTP Handler.
//
// This is only needed to install the handler in a non-standard location.
func Handler() http.Handler {
return http.HandlerFunc(expvarHandler)
} |
I ran into this issue myself and didn't see any followup here, so I submitted a CL: https://go-review.googlesource.com/#/c/24722/ |
CL https://golang.org/cl/24722 mentions this issue. |
Any updates on the issue? |
We're in a freeze for Go 1.7. The CL above was tagged as R=go1.8 for review during the Go 1.8 dev cycle, opening soon. |
miguelff
pushed a commit
to github/freno
that referenced
this issue
Mar 16, 2017
As expvar.Handler is not exported anymore: See golang/go#15030
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
go version
)?go1.6
go env
)?darwin amd64
import _ "expvar"
cannot add the appropriate handler for me. The handler added by the init function adds an http handler that does a bit of logic I would like to have. I can make it work a couple of different ways:myMux.Handle("/debug/vars", http.DefaultServeMux)
, which sort of works, but doesn't help me if I want it at another path or anything like this.Simply exporting
expvarHandler
would allow me to domyMux.HandleFunc("/whatever/route/I/want", expvar.Handler)
.Would the go team consider a change to that effect?
The text was updated successfully, but these errors were encountered: