1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-05 02:29:13 -04:00

cleanup unnecessary method in serial.

This commit is contained in:
Darien Raymond
2018-11-02 18:20:02 +01:00
parent ad462860e2
commit 35ccc3a49c
18 changed files with 80 additions and 140 deletions

View File

@@ -3,8 +3,6 @@ package net
import (
"encoding/binary"
"strconv"
"v2ray.com/core/common/serial"
)
// Port represents a network port in TCP and UDP protocol.
@@ -42,7 +40,7 @@ func (p Port) Value() uint16 {
// String returns the string presentation of a Port.
func (p Port) String() string {
return serial.Uint16ToString(p.Value())
return strconv.Itoa(int(p))
}
// FromPort returns the beginning port of this PortRange.