We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does it really work? Does func(error) type match to method of persistConn
type Transport struct { reqCanceler map[*Request]func(error)
func (t *Transport) replaceReqCanceler(r *Request, fn func(error)) bool { t.reqCanceler[r] = fn
func (pc *persistConn) cancelRequest(err error) {
func (pc *persistConn) roundTrip(req *transportRequest) (resp *Response, err error) { if !pc.t.replaceReqCanceler(req.Request, pc.cancelRequest) {
The text was updated successfully, but these errors were encountered:
Yes, it matches. See https://golang.org/ref/spec#Method_values. Here is a playground example to demonstrate this behavior: https://play.golang.org/p/yHJtcrG4H0d. For questions about Go, see https://golang.org/wiki/Questions.
Sorry, something went wrong.
No branches or pull requests
Does it really work? Does func(error) type match to method of persistConn
type Transport struct {
reqCanceler map[*Request]func(error)
func (t *Transport) replaceReqCanceler(r *Request, fn func(error)) bool {
t.reqCanceler[r] = fn
func (pc *persistConn) cancelRequest(err error) {
func (pc *persistConn) roundTrip(req *transportRequest) (resp *Response, err error) {
if !pc.t.replaceReqCanceler(req.Request, pc.cancelRequest) {
The text was updated successfully, but these errors were encountered: