diff --git a/lntest/btcd.go b/lntest/btcd.go index 09f33472b..2d735fa2b 100644 --- a/lntest/btcd.go +++ b/lntest/btcd.go @@ -7,7 +7,6 @@ import ( "encoding/hex" "errors" "fmt" - "io/ioutil" "os" "strings" @@ -135,7 +134,7 @@ func NewBackend(miner string, netParams *chaincfg.Params) ( // the log files, including any compressed log files from // logrorate, before deleting the temporary log dir. logDir := fmt.Sprintf("%s/%s", baseLogDir, netParams.Name) - files, err := ioutil.ReadDir(logDir) + files, err := os.ReadDir(logDir) if err != nil { errStr += fmt.Sprintf( "unable to read log directory: %v\n", err, diff --git a/lntest/harness_miner.go b/lntest/harness_miner.go index a28715321..f6348c078 100644 --- a/lntest/harness_miner.go +++ b/lntest/harness_miner.go @@ -4,7 +4,6 @@ import ( "bytes" "context" "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -121,7 +120,7 @@ func (h *HarnessMiner) saveLogs() { // After shutting down the miner, we'll make a copy of the log files // before deleting the temporary log dir. path := fmt.Sprintf("%s/%s", h.logPath, harnessNetParams.Name) - files, err := ioutil.ReadDir(path) + files, err := os.ReadDir(path) require.NoError(h, err, "unable to read log directory") for _, file := range files { diff --git a/lntest/node/harness_node.go b/lntest/node/harness_node.go index 1afb095d8..629497367 100644 --- a/lntest/node/harness_node.go +++ b/lntest/node/harness_node.go @@ -1032,7 +1032,7 @@ func addLogFile(hn *HarnessNode) error { // copyAll copies all files and directories from srcDir to dstDir recursively. // Note that this function does not support links. func copyAll(dstDir, srcDir string) error { - entries, err := ioutil.ReadDir(srcDir) + entries, err := os.ReadDir(srcDir) if err != nil { return err }