multi: replace ioutil.WriteFile
This commit is contained in:
1 parent
ab83343c87
commit
789c6bac8c
13 files changed
+20
-31
No files matched your search
@@ -10,7 +10,6 @@ import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -289,7 +288,7 @@ func New(cfg *Config) (*WalletKit, lnrpc.MacaroonPerms, error) {
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
err = ioutil.WriteFile(macFilePath, walletKitMacBytes, 0644)
|
||||
err = os.WriteFile(macFilePath, walletKitMacBytes, 0644)
|
||||
if err != nil {
|
||||
_ = os.Remove(macFilePath)
|
||||
return nil, nil, err
|
||||
|
||||
Reference in new issue
Block a user