mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-22 07:08:14 +02:00
multi: replace ioutil.WriteFile
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
crand "crypto/rand"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync/atomic"
|
||||
@@ -216,7 +215,7 @@ func New(cfg *Config) (*Server, lnrpc.MacaroonPerms, error) {
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
err = ioutil.WriteFile(macFilePath, routerMacBytes, 0644)
|
||||
err = os.WriteFile(macFilePath, routerMacBytes, 0644)
|
||||
if err != nil {
|
||||
_ = os.Remove(macFilePath)
|
||||
return nil, nil, err
|
||||
|
Reference in New Issue
Block a user