1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-10-11 19:44:02 -04:00
This commit is contained in:
Darien Raymond
2017-02-20 11:25:05 +01:00
parent bf7906c7f0
commit 29d614fda5
5 changed files with 14 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ func (v Network) URLPrefix() string {
}
}
// HashNetwork returns true if the given network is in v NetworkList.
// HasNetwork returns true if the given network is in v NetworkList.
func (v NetworkList) HasNetwork(network Network) bool {
for _, value := range v.Network {
if string(value) == string(network) {
@@ -60,6 +60,7 @@ func (v NetworkList) Get(idx int) Network {
return v.Network[idx]
}
// Size returns the number of networks in this network list.
func (v NetworkList) Size() int {
return len(v.Network)
}