Error when doing the json parsing.
Hi,
I got following error message and it looks strange.
error fetching stats: json: cannot unmarshal number into Go value of type main.stats

Using Go1.5 with Martini and invoke by gom -target "http://localhost:3000". Ubuntu 14.04.
I found that's because it cannot get the pprofstats info.
After updating, I got new message.
error fetching stats: invalid character '<' looking for beginning of value

Any suggestion to debug?
Related to https://github.com/rakyll/gom/pull/15/.
You need to manually register gom/http.Handler() to respond to /debug/_gom.
import gomhttp "github.com/rakyll/gom/http"
// ...
h := gomhttp.Handler()
m.Use(func(res http.ResponseWriter, req *http.Request) {
if req.URL.Path == "/debug/_gom" {
h(res, req)
}
})
I add as you suggested. But still get same error message.
error fetching stats: invalid character '<' looking for beginning of value
/debug/_gom shows below line
{"goroutine":28,"thread":9,"block":0,"timestamp":1452401805}
I guess this is related to the body's being gzipped or not. I will try to reproduce and send out a fix soon.