1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-22 07:25:23 +00:00

load from network will be replaced with subscription

This commit is contained in:
Shelikhoo 2021-09-04 19:33:33 +01:00
parent cef6a46548
commit 6a2cca1220
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -25,8 +25,6 @@ func LoadArg(arg string) (out io.Reader, err error) {
// LoadArgToBytes loads one arg to []byte, maybe an remote url, or local file path
func LoadArgToBytes(arg string) (out []byte, err error) {
switch {
case strings.HasPrefix(arg, "http://"), strings.HasPrefix(arg, "https://"):
out, err = FetchHTTPContent(arg)
default:
out, err = ioutil.ReadFile(arg)
}