From 37c4693df9a992730c00c38434e3c9938873f7a3 Mon Sep 17 00:00:00 2001 From: roc Date: Thu, 14 Apr 2022 12:09:26 +0800 Subject: [PATCH] remove unused code in middleware --- middleware.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/middleware.go b/middleware.go index e6d2f86f..6eb99879 100644 --- a/middleware.go +++ b/middleware.go @@ -372,20 +372,6 @@ func handleDownload(c *Client, r *Response) (err error) { closeq(output) }() - // if r.Request.downloadCallback != nil { - // output = &callbackWriter{ - // Writer: output, - // lastTime: time.Now(), - // interval: r.Request.downloadCallbackInterval, - // callback: func(written int64) { - // r.Request.downloadCallback(DownloadInfo{ - // Response: r, - // DownloadedSize: written, - // }) - // }, - // } - // } - _, err = io.Copy(output, body) r.setReceivedAt() return