mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-16 17:38:45 -05:00
uint32
This commit is contained in:
parent
ac58eed310
commit
28cf3aa0c7
@ -46,6 +46,26 @@ func (this IntLiteral) Bytes() []byte {
|
||||
}
|
||||
}
|
||||
|
||||
type Uint32Literal uint32
|
||||
|
||||
func (this Uint32Literal) String() string {
|
||||
return strconv.FormatUint(uint64(this.Value()), 10)
|
||||
}
|
||||
|
||||
func (this Uint32Literal) Value() uint32 {
|
||||
return uint32(this)
|
||||
}
|
||||
|
||||
func (this Uint32Literal) Bytes() []byte {
|
||||
value := this.Value()
|
||||
return []byte{
|
||||
byte(value >> 24),
|
||||
byte(value >> 16),
|
||||
byte(value >> 8),
|
||||
byte(value),
|
||||
}
|
||||
}
|
||||
|
||||
type Int64Literal int64
|
||||
|
||||
func (this Int64Literal) String() string {
|
||||
|
Loading…
Reference in New Issue
Block a user