Skip to content

Alerts for too many middlewares #68

@gonejack

Description

@gonejack
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions