mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 13:40:38 +03:00
Misc ioutil deprecation adjustments
To make the tests pass. * Replace io => os.ReadFile in magefile.go * Adjust failing image test vs fs.DirEntry * Adjust poller test See #10732
This commit is contained in:
parent
d453c12742
commit
a669467d98
3 changed files with 15 additions and 3 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
@ -298,7 +297,7 @@ func TestCoverHTML() error {
|
|||
if err := sh.Run(goexe, "test", "-coverprofile="+cover, "-covermode=count", pkg); err != nil {
|
||||
return err
|
||||
}
|
||||
b, err := io.ReadFile(cover)
|
||||
b, err := os.ReadFile(cover)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue