Skip to content

Commit caf2419

Browse files
committed
multi: replace ioutil.ReadDir
1 parent c7f81d3 commit caf2419

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

lntest/btcd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"encoding/hex"
88
"errors"
99
"fmt"
10-
"io/ioutil"
1110
"os"
1211
"strings"
1312

@@ -135,7 +134,7 @@ func NewBackend(miner string, netParams *chaincfg.Params) (
135134
// the log files, including any compressed log files from
136135
// logrorate, before deleting the temporary log dir.
137136
logDir := fmt.Sprintf("%s/%s", baseLogDir, netParams.Name)
138-
files, err := ioutil.ReadDir(logDir)
137+
files, err := os.ReadDir(logDir)
139138
if err != nil {
140139
errStr += fmt.Sprintf(
141140
"unable to read log directory: %v\n", err,

lntest/harness_miner.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"context"
66
"fmt"
7-
"io/ioutil"
87
"os"
98
"path/filepath"
109
"strings"
@@ -121,7 +120,7 @@ func (h *HarnessMiner) saveLogs() {
121120
// After shutting down the miner, we'll make a copy of the log files
122121
// before deleting the temporary log dir.
123122
path := fmt.Sprintf("%s/%s", h.logPath, harnessNetParams.Name)
124-
files, err := ioutil.ReadDir(path)
123+
files, err := os.ReadDir(path)
125124
require.NoError(h, err, "unable to read log directory")
126125

127126
for _, file := range files {

lntest/node/harness_node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ func addLogFile(hn *HarnessNode) error {
10321032
// copyAll copies all files and directories from srcDir to dstDir recursively.
10331033
// Note that this function does not support links.
10341034
func copyAll(dstDir, srcDir string) error {
1035-
entries, err := ioutil.ReadDir(srcDir)
1035+
entries, err := os.ReadDir(srcDir)
10361036
if err != nil {
10371037
return err
10381038
}

0 commit comments

Comments
 (0)