mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 07:26:24 -05:00
fix: switch away from ioutil
This commit is contained in:
parent
0c3105691f
commit
82e730bb70
@ -8,7 +8,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -5,7 +5,7 @@ package common
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/build"
|
"go/build"
|
||||||
"io/ioutil"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
@ -70,7 +70,7 @@ func GetRuntimeEnv(key string) (string, error) {
|
|||||||
}
|
}
|
||||||
var data []byte
|
var data []byte
|
||||||
var runtimeEnv string
|
var runtimeEnv string
|
||||||
data, readErr := ioutil.ReadFile(file)
|
data, readErr := os.ReadFile(file)
|
||||||
if readErr != nil {
|
if readErr != nil {
|
||||||
return "", readErr
|
return "", readErr
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package drain
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/dice"
|
"github.com/v2fly/v2ray-core/v4/common/dice"
|
||||||
)
|
)
|
||||||
|
@ -2,7 +2,6 @@ package mergers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package mergers
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/cmdarg"
|
"github.com/v2fly/v2ray-core/v4/common/cmdarg"
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/merge"
|
"github.com/v2fly/v2ray-core/v4/infra/conf/merge"
|
||||||
|
Loading…
Reference in New Issue
Block a user