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

View File

@@ -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
}