mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
refactor: move from io/ioutil to io and os package (#1772)
The io/ioutil package has been deprecated as of Go 1.16, see https://golang.org/doc/go1.16#ioutil. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ package scraper
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
@@ -53,7 +53,7 @@ func (s *jsonScraper) loadURL(url string) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
logger.Infof("loadURL (%s)\n", url)
|
||||
doc, err := ioutil.ReadAll(r)
|
||||
doc, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user