diff --git a/htlcswitch/mock.go b/htlcswitch/mock.go index a0f38c74f..dfa834c58 100644 --- a/htlcswitch/mock.go +++ b/htlcswitch/mock.go @@ -7,7 +7,6 @@ import ( "encoding/binary" "fmt" "io" - "io/ioutil" "net" "os" "path/filepath" @@ -947,7 +946,7 @@ var _ ChannelLink = (*mockChannelLink)(nil) func newDB() (*channeldb.DB, func(), error) { // First, create a temporary directory to be used for the duration of // this test. - tempDirName, err := ioutil.TempDir("", "channeldb") + tempDirName, err := os.MkdirTemp("", "channeldb") if err != nil { return nil, nil, err } diff --git a/lntest/bitcoind_common.go b/lntest/bitcoind_common.go index 657da7cd3..9cbcd23fd 100644 --- a/lntest/bitcoind_common.go +++ b/lntest/bitcoind_common.go @@ -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) diff --git a/lntest/node/harness_node.go b/lntest/node/harness_node.go index 629497367..3df5a8e64 100644 --- a/lntest/node/harness_node.go +++ b/lntest/node/harness_node.go @@ -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)