mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-25 06:46:09 +03:00
remove depend of gopkg.in/yaml.v2
This commit is contained in:
parent
e548b933e2
commit
c9fa690601
@ -9,7 +9,7 @@ require (
|
||||
github.com/miekg/dns v1.1.62
|
||||
github.com/oschwald/maxminddb-golang v1.12.0
|
||||
golang.org/x/sync v0.8.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
replace github.com/metacubex/mihomo => ../../foss/golang/clash
|
||||
@ -111,6 +111,5 @@ require (
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.24.0 // indirect
|
||||
google.golang.org/protobuf v1.34.2 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
lukechampine.com/blake3 v1.3.0 // indirect
|
||||
)
|
||||
|
@ -267,8 +267,6 @@ google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6h
|
||||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
@ -1,12 +1,12 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
P "path"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"cfa/native/app"
|
||||
|
||||
@ -33,7 +33,7 @@ func logDns(cfg *config.RawConfig) {
|
||||
func UnmarshalAndPatch(profilePath string) (*config.RawConfig, error) {
|
||||
configPath := P.Join(profilePath, "config.yaml")
|
||||
|
||||
configData, err := ioutil.ReadFile(configPath)
|
||||
configData, err := os.ReadFile(configPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/metacubex/mihomo/constant"
|
||||
@ -31,7 +31,7 @@ func ReadOverride(slot OverrideSlot) string {
|
||||
return defaultPersistOverride
|
||||
}
|
||||
|
||||
buf, err := ioutil.ReadAll(file)
|
||||
buf, err := io.ReadAll(file)
|
||||
if err != nil {
|
||||
return defaultPersistOverride
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user