multi: repleace ioutil.ReadAll

This commit is contained in:
erik
2023-06-13 20:17:03 +07:00
committed by ErikEk
parent 8ce3622792
commit 619c8f4eb8
8 changed files with 12 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"os"
@@ -2006,7 +2007,7 @@ func extractBtcdRPCParams(btcdConfigPath string) (string, string, error) {
// With the file open extract the contents of the configuration file so
// we can attempt to locate the RPC credentials.
configContents, err := ioutil.ReadAll(btcdConfigFile)
configContents, err := io.ReadAll(btcdConfigFile)
if err != nil {
return "", "", err
}
@@ -2056,7 +2057,7 @@ func extractBitcoindRPCParams(networkName, bitcoindDataDir, bitcoindConfigPath,
// With the file open extract the contents of the configuration file so
// we can attempt to locate the RPC credentials.
configContents, err := ioutil.ReadAll(bitcoindConfigFile)
configContents, err := io.ReadAll(bitcoindConfigFile)
if err != nil {
return "", "", "", "", err
}