1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-23 02:26:49 -05:00
v2fly/common/net/testing/port.go

11 lines
195 B
Go
Raw Normal View History

2015-11-01 15:32:08 -05:00
package testing
import (
2016-01-22 10:25:01 -05:00
"github.com/v2ray/v2ray-core/common/dice"
2015-12-02 15:44:01 -05:00
v2net "github.com/v2ray/v2ray-core/common/net"
2015-11-01 15:32:08 -05:00
)
2015-12-02 15:44:01 -05:00
func PickPort() v2net.Port {
2016-01-25 05:47:22 -05:00
return v2net.Port(30000 + dice.Roll(5000))
2015-11-01 15:32:08 -05:00
}