Closed zquestz closed 8 years ago
NOTE: this does work if I pass the handler directly into the ListenAndServe method. Just not if I use http.Handle.
I think the examples floating around for Manners might be a bit mixed up. It seems to imply you can setup the net/http library handlers as per usual and then fire manners ListenAndServe() to start the server.
It actually doesn't go looking for the default mux if you use Handle() or HandleFunc() against the http library. Something along the lines of the following seems to work if you want to do it this way -
http.HandleFunc("/doSomething/", doSomething)
manners.ListenAndServe(":8080", http.DefaultServeMux)
So was giving this library a try, but I can't seem to get it working. Wrote a tiny sample app just to make sure there was nothing special in my code.
This panics and returns the following stack trace.
Am I doing something wrong? The docs don't wrap the Handle passed function with http.HandlerFunc, but that is required for it to compile. Has this been tested against Go 1.6?