multi: repleace ioutil.ReadFile
This commit is contained in:
1 parent
619c8f4eb8
commit
ab83343c87
23 files changed
+55
-62
No files matched your search
+1
-1
@@ -124,7 +124,7 @@ func (f *OnionFile) PrivateKey() ([]byte, error) {
|
||||
}
|
||||
|
||||
// Try to read the Tor private key to pass into the AddOnion call.
|
||||
privateKeyContent, err := ioutil.ReadFile(f.privateKeyPath)
|
||||
privateKeyContent, err := os.ReadFile(f.privateKeyPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ import (
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/textproto"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -597,7 +597,7 @@ func (c *Controller) getAuthCookie(info protocolInfo) ([]byte, error) {
|
||||
cookieFilePath = strings.Trim(cookieFilePath, "\"")
|
||||
|
||||
// Read the cookie from the file and ensure it has the correct length.
|
||||
cookie, err := ioutil.ReadFile(cookieFilePath)
|
||||
cookie, err := os.ReadFile(cookieFilePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user