调整
This commit is contained in:
parent
450e4940b2
commit
ac62099b73
@ -5,7 +5,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
"log"
|
||||||
"mime"
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -109,7 +108,7 @@ func (d *Downloader) downloadPart(c PartFile, f *os.File) error {
|
|||||||
_ = Body.Close()
|
_ = Body.Close()
|
||||||
}(resp.Body)
|
}(resp.Body)
|
||||||
|
|
||||||
bs, err := ioutil.ReadAll(resp.Body)
|
bs, err := io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -170,7 +169,7 @@ func (d *Downloader) Run() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
fByte, err = ioutil.ReadAll(tmpFile)
|
fByte, err = io.ReadAll(tmpFile)
|
||||||
} else {
|
} else {
|
||||||
tmpFile, err = os.Create(path)
|
tmpFile, err = os.Create(path)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user