1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-07 18:57:44 -05:00
v2fly/common/serial/numbers.go

34 lines
446 B
Go
Raw Normal View History

2015-12-03 10:57:23 -05:00
package serial
import (
"strconv"
)
type Uint16 interface {
Value() uint16
}
type Uint16Literal uint16
func (this Uint16Literal) String() string {
return strconv.Itoa(int(this))
}
func (this Uint16Literal) Value() uint16 {
return uint16(this)
}
type Int interface {
Value() int
}
type IntLiteral int
func (this IntLiteral) String() string {
return strconv.Itoa(int(this))
}
func (this IntLiteral) Value() int {
return int(this)
}