mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
Replace deprecated ioutil with io and os
https://pkg.go.dev/io/ioutil is deprecated since Go 1.16.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
97b010f521
commit
d453c12742
@@ -18,7 +18,6 @@ import (
|
||||
"fmt"
|
||||
"image"
|
||||
"image/gif"
|
||||
"io/ioutil"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"os"
|
||||
@@ -750,9 +749,9 @@ func TestImageOperationsGolden(t *testing.T) {
|
||||
func assetGoldenDirs(c *qt.C, dir1, dir2 string) {
|
||||
|
||||
// The two dirs above should now be the same.
|
||||
dirinfos1, err := ioutil.ReadDir(dir1)
|
||||
dirinfos1, err := os.ReadDir(dir1)
|
||||
c.Assert(err, qt.IsNil)
|
||||
dirinfos2, err := ioutil.ReadDir(dir2)
|
||||
dirinfos2, err := os.ReadDir(dir2)
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(len(dirinfos1), qt.Equals, len(dirinfos2))
|
||||
|
||||
|
Reference in New Issue
Block a user