change: replace ioutil.ReadAll with io.ReadAll

This commit is contained in:
lilong.129
2023-08-29 17:27:54 +08:00
parent 97430bf451
commit b64fe9cfdd
6 changed files with 10 additions and 12 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ import (
"fmt"
"image"
"image/color"
"io/ioutil"
"io"
"math"
"os"
@@ -133,7 +133,7 @@ func getBufFromDisk(name string) (*bytes.Buffer, error) {
return nil, err
}
var all []byte
if all, err = ioutil.ReadAll(f); err != nil {
if all, err = io.ReadAll(f); err != nil {
return nil, err
}
return bytes.NewBuffer(all), nil
@@ -361,7 +361,7 @@ func getMatsFromDisk(nameImage, nameTpl string, flags gocv.IMReadFlag) (matImage
// return nil, e
// }
// var all []byte
// if all, e = ioutil.ReadAll(f); e != nil {
// if all, e = io.ReadAll(f); e != nil {
// return nil, e
// }
// return bytes.NewBuffer(all), nil