multi: repleace ioutil.ReadFile

This commit is contained in:
erik
2023-06-13 21:22:44 +07:00
committed by ErikEk
parent 619c8f4eb8
commit ab83343c87
23 changed files with 55 additions and 62 deletions

3
lnd.go
View File

@@ -8,7 +8,6 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"net"
"net/http"
"net/http/pprof"
@@ -83,7 +82,7 @@ func AdminAuthOptions(cfg *Config, skipMacaroons bool) ([]grpc.DialOption,
// Get the admin macaroon if macaroons are active.
if !skipMacaroons && !cfg.NoMacaroons {
// Load the admin macaroon file.
macBytes, err := ioutil.ReadFile(cfg.AdminMacPath)
macBytes, err := os.ReadFile(cfg.AdminMacPath)
if err != nil {
return nil, fmt.Errorf("unable to read macaroon "+
"path (check the network setting!): %v", err)