Alerts for too many middlewares
gonejack opened this issue · comments
会有猫的 commented
package main
import (
"gopkg.in/h2non/gentleman.v2"
)
func main() {
var client = gentleman.New()
var src chan []byte
for dat := range src {
rq := client.URL("url").Post().JSON(dat)
rq.Do()
//....
}
}
I know this is not gentleman's mistake but mine writing client.URL("url").Post()
instead of client.Post().URL("url")
But it took me days to trace this CPU high usage issue.
Is there any way to prevent people falling into this trouble anymore, could gentleman returning an error when there are too many middlewares.