mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-04 23:40:26 +08:00
优化代码结构
This commit is contained in:
@@ -44,7 +44,6 @@ func NewPacket(proto uint8, srcPort uint16, dstPort uint16, data []byte) *Packet
|
||||
}
|
||||
|
||||
// UnMashal 将 data 的数据解码到自身
|
||||
// 同时通过 Hash 验证数据完整性
|
||||
func (p *Packet) UnMashal(data []byte) error {
|
||||
return json.Unmarshal(data, p)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user