mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Move from deprecated ioutil to os and io packages (#744)
This commit is contained in:
parent
1ef824c0b4
commit
4abf98c1be
17 changed files with 29 additions and 43 deletions
5
main/confloader/external/external.go
vendored
5
main/confloader/external/external.go
vendored
|
@ -5,7 +5,6 @@ package external
|
|||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
|
@ -24,10 +23,10 @@ func ConfigLoader(arg string) (out io.Reader, err error) {
|
|||
data, err = FetchHTTPContent(arg)
|
||||
|
||||
case arg == "stdin:":
|
||||
data, err = ioutil.ReadAll(os.Stdin)
|
||||
data, err = io.ReadAll(os.Stdin)
|
||||
|
||||
default:
|
||||
data, err = ioutil.ReadFile(arg)
|
||||
data, err = os.ReadFile(arg)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue