chore: remove refs to deprecated io/ioutil (#5519)

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guangwu
2023-11-16 19:16:15 +08:00
committed by GitHub
parent 3d51845f57
commit f904596cbc
2 changed files with 3 additions and 5 deletions

View File

@ -8,7 +8,6 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"net/http"
"sync"
"testing"
@ -169,7 +168,7 @@ func newDownloadRangeClient(data []byte) (*downloadCaptureClient, *int, *[]strin
header := &http.Header{}
header.Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", start, fin-1, len(data)))
return &http.Response{
Body: ioutil.NopCloser(bytes.NewReader(bodyBytes)),
Body: io.NopCloser(bytes.NewReader(bodyBytes)),
Header: *header,
ContentLength: int64(len(bodyBytes)),
}, nil