refactor: remove ioutil
This commit is contained in:
parent
48e5e8cd04
commit
820208d079
3
cache/cache_test.go
vendored
3
cache/cache_test.go
vendored
@ -1,7 +1,6 @@
|
|||||||
package cache
|
package cache
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
@ -10,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestDownloadRootFS(t *testing.T) {
|
func TestDownloadRootFS(t *testing.T) {
|
||||||
tmp, err := ioutil.TempDir("", "out-of-tree_")
|
tmp, err := os.MkdirTemp("", "out-of-tree_")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ package cmd
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.dumpstack.io/tools/out-of-tree/fs"
|
"code.dumpstack.io/tools/out-of-tree/fs"
|
||||||
@ -35,7 +35,7 @@ func (cmd *PackCmd) Run(g *Globals) (err error) {
|
|||||||
tag := fmt.Sprintf("pack_run_%d", time.Now().Unix())
|
tag := fmt.Sprintf("pack_run_%d", time.Now().Unix())
|
||||||
log.Print("Tag:", tag)
|
log.Print("Tag:", tag)
|
||||||
|
|
||||||
files, err := ioutil.ReadDir(g.WorkDir)
|
files, err := os.ReadDir(g.WorkDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user