build: update to go1.21rc3 and make go1.19 the minimum required version

Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
This commit is contained in:
Anagh Kumar Baranwal
2023-06-23 14:20:01 +05:30
committed by Nick Craig-Wood
parent 0063d14dbb
commit 0ef0e908ca
14 changed files with 45 additions and 66 deletions

View File

@@ -11,7 +11,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"net/url"
@@ -163,7 +162,7 @@ const drainLimit = 10 * 1024 * 1024
// drainAndClose discards up to drainLimit bytes from r and closes
// it. Any errors from the Read or Close are returned.
func drainAndClose(r io.ReadCloser) (err error) {
_, readErr := io.CopyN(ioutil.Discard, r, drainLimit)
_, readErr := io.CopyN(io.Discard, r, drainLimit)
if readErr == io.EOF {
readErr = nil
}