File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import (
1313 "fmt"
1414 "io"
1515 "net/netip"
16+ "slices"
1617 "strings"
1718 "sync"
1819 "sync/atomic"
@@ -1221,12 +1222,7 @@ func canUseDefaultDNS(id string) bool {
12211222}
12221223
12231224func isTransportID (match string , ids ... string ) bool {
1224- for _ , t := range ids {
1225- if t == match {
1226- return true
1227- }
1228- }
1229- return false
1225+ return slices .Contains (ids , match )
12301226}
12311227
12321228func isAnyBlockAll (ids ... string ) bool {
@@ -1251,12 +1247,7 @@ func isAnyLocal(ids ...string) bool {
12511247}
12521248
12531249func isAnyPlus (ids ... string ) bool {
1254- for _ , id := range ids {
1255- if isPlus (id ) {
1256- return true
1257- }
1258- }
1259- return false
1250+ return slices .ContainsFunc (ids , isPlus )
12601251}
12611252
12621253func isAnyDefault (ids ... string ) bool {
You can’t perform that action at this time.
0 commit comments