api/debug.go
func dumpGoroutines(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	if !permission.Check(t, permission.PermDebug) {
		return permission.ErrUnauthorized
	}
	return pprof.Lookup("goroutine").WriteTo(w, 2)
}
func dumpGoroutines(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	if !permission.Check(t, permission.PermDebug) {
		return permission.ErrUnauthorized
	}
	return pprof.Lookup("goroutine").WriteTo(w, 2)
}
// title: dump goroutines
// path: /debug/goroutines
// method: GET
// responses:
//   200: Ok