1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-17 08:19:57 -04:00

remove unused functions

This commit is contained in:
Darien Raymond
2018-11-20 17:05:32 +01:00
parent 769f770cf7
commit 234c8081f4
2 changed files with 2 additions and 16 deletions

View File

@@ -11,6 +11,7 @@ func (n Network) SystemString() string {
}
}
// HasNetwork returns true if the network list has a certain network.
func HasNetwork(list []Network, network Network) bool {
for _, value := range list {
if value == network {
@@ -19,18 +20,3 @@ func HasNetwork(list []Network, network Network) bool {
}
return false
}
// HasNetwork returns true if the given network is in v NetworkList.
func (l NetworkList) HasNetwork(network Network) bool {
for _, value := range l.Network {
if string(value) == string(network) {
return true
}
}
return false
}
// Size returns the number of networks in this network list.
func (l NetworkList) Size() int {
return len(l.Network)
}