-
-
Notifications
You must be signed in to change notification settings - Fork 999
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
Panic on doc generate when using middleware.Profiler #153
Comments
Im unable to reproduce the above issue with the latest master, but if you see it comes up again please re-open the ticket and I'll take a look asap. |
@pkieltyka I have the same issue with the latest releases. I opened the issue with the reproducer for the docgen repo here. |
I have this issue as well on the latest releases |
Do you guys have full reproducer? |
@VojtechVitek the following contrived example shows the exact panic received:
package main
import (
"net/http"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/go-chi/docgen"
)
func main() {
r := chi.NewRouter()
r.Mount("/debug", middleware.Profiler())
r.Get("/bla", blaHandler)
docgen.JSONRoutesDoc(r)
http.ListenAndServe(":8080", r)
}
func blaHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(204)
}
|
@ladydascalie I've tried to run your example using chi v3.3.1 on go 1.9.2 and couldn't reproduce the issue - the docs generated fine. Would you mind confirming when you have a chance? |
Sorry, I missed the notification for this before. Running it on the latest version works properly for me! |
@ladydascalie awesome thanks for confirming! |
Hi
When using the profiler middleware in combination with the docgen package, I get a panic.
main.go:
panic:
The text was updated successfully, but these errors were encountered: