File tree Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ require (
99 github.com/miekg/dns v1.1.62
1010 github.com/oschwald/maxminddb-golang v1.12.0
1111 golang.org/x/sync v0.8.0
12- gopkg.in/yaml.v2 v2.4.0
12+ gopkg.in/yaml.v3 v3.0.1
1313)
1414
1515replace github.com/metacubex/mihomo => ../../foss/golang/clash
@@ -111,6 +111,5 @@ require (
111111 golang.org/x/time v0.5.0 // indirect
112112 golang.org/x/tools v0.24.0 // indirect
113113 google.golang.org/protobuf v1.34.2 // indirect
114- gopkg.in/yaml.v3 v3.0.1 // indirect
115114 lukechampine.com/blake3 v1.3.0 // indirect
116115)
Original file line number Diff line number Diff line change @@ -267,8 +267,6 @@ google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6h
267267google.golang.org/protobuf v1.34.2 /go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw =
268268gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM =
269269gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
270- gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY =
271- gopkg.in/yaml.v2 v2.4.0 /go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ =
272270gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c /go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM =
273271gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA =
274272gopkg.in/yaml.v3 v3.0.1 /go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM =
Original file line number Diff line number Diff line change 11package config
22
33import (
4- "io/ioutil "
4+ "os "
55 P "path"
66 "runtime"
77 "strings"
88
9- "gopkg.in/yaml.v2 "
9+ "gopkg.in/yaml.v3 "
1010
1111 "cfa/native/app"
1212
@@ -33,7 +33,7 @@ func logDns(cfg *config.RawConfig) {
3333func UnmarshalAndPatch (profilePath string ) (* config.RawConfig , error ) {
3434 configPath := P .Join (profilePath , "config.yaml" )
3535
36- configData , err := ioutil .ReadFile (configPath )
36+ configData , err := os .ReadFile (configPath )
3737 if err != nil {
3838 return nil , err
3939 }
Original file line number Diff line number Diff line change 11package config
22
33import (
4- "io/ioutil "
4+ "io"
55 "os"
66
77 "github.com/metacubex/mihomo/constant"
@@ -31,7 +31,7 @@ func ReadOverride(slot OverrideSlot) string {
3131 return defaultPersistOverride
3232 }
3333
34- buf , err := ioutil .ReadAll (file )
34+ buf , err := io .ReadAll (file )
3535 if err != nil {
3636 return defaultPersistOverride
3737 }
You can’t perform that action at this time.
0 commit comments