mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
remove refs to deprecated io/ioutil
This commit is contained in:
@@ -3,8 +3,8 @@ package auth
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
@@ -28,7 +28,7 @@ func SetupAuth(engine *gin.Engine) *gin.RouterGroup {
|
||||
}
|
||||
|
||||
func getAccounts() gin.Accounts {
|
||||
buf, err := ioutil.ReadFile(filepath.Join(settings.Path, "accs.db"))
|
||||
buf, err := os.ReadFile(filepath.Join(settings.Path, "accs.db"))
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@@ -22,11 +22,11 @@ func Blocker() gin.HandlerFunc {
|
||||
}
|
||||
|
||||
name := filepath.Join(settings.Path, "bip.txt")
|
||||
buf, _ := ioutil.ReadFile(name)
|
||||
buf, _ := os.ReadFile(name)
|
||||
blackIpList := scanBuf(buf)
|
||||
|
||||
name = filepath.Join(settings.Path, "wip.txt")
|
||||
buf, _ = ioutil.ReadFile(name)
|
||||
buf, _ = os.ReadFile(name)
|
||||
whiteIpList := scanBuf(buf)
|
||||
|
||||
if blackIpList.NumRanges() == 0 && whiteIpList.NumRanges() == 0 {
|
||||
|
||||
Reference in New Issue
Block a user