multi: replace ioutil.TempDir

This commit is contained in:
erik authored and ErikEk committed 2024-04-25 11:24:41 +02:00
1 parent caf2419ff6
commit df4ddcc573
3 files changed
+3 -6

No files matched your search

+1 -2
View File
@@ -6,7 +6,6 @@ package lntest
import (
"errors"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -105,7 +104,7 @@ func newBackend(miner string, netParams *chaincfg.Params, extraArgs []string,
return nil, nil, err
}
tempBitcoindDir, err := ioutil.TempDir("", "bitcoind")
tempBitcoindDir, err := os.MkdirTemp("", "bitcoind")
if err != nil {
return nil, nil,
fmt.Errorf("unable to create temp directory: %w", err)
+1 -2
View File
@@ -9,7 +9,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -824,7 +823,7 @@ func (hn *HarnessNode) BackupDB() error {
}
} else {
// Backup files.
tempDir, err := ioutil.TempDir("", "past-state")
tempDir, err := os.MkdirTemp("", "past-state")
if err != nil {
return fmt.Errorf("unable to create temp db folder: %w",
err)