mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-14 12:27:18 +00:00
style[golang]: replace space with tab
This commit is contained in:
@@ -4,7 +4,7 @@ func (protocol ${protocol_name}) ProtocolId() int16 {
|
||||
|
||||
func (protocol ${protocol_name}) write(buffer *ByteBuffer, packet any) {
|
||||
if packet == nil {
|
||||
buffer.WriteInt(0)
|
||||
buffer.WriteInt(0)
|
||||
return
|
||||
}
|
||||
var message = packet.(*${protocol_name})
|
||||
@@ -20,7 +20,7 @@ func (protocol ${protocol_name}) read(buffer *ByteBuffer) any {
|
||||
var beforeReadIndex = buffer.GetReadOffset()
|
||||
${protocol_read_deserialization}
|
||||
if length > 0 {
|
||||
buffer.SetReadOffset(beforeReadIndex + length)
|
||||
}
|
||||
buffer.SetReadOffset(beforeReadIndex + length)
|
||||
}
|
||||
return packet
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ func (protocol ${protocol_name}) ProtocolId() int16 {
|
||||
|
||||
func (protocol ${protocol_name}) write(buffer *ByteBuffer, packet any) {
|
||||
if packet == nil {
|
||||
buffer.WriteInt(0)
|
||||
buffer.WriteInt(0)
|
||||
return
|
||||
}
|
||||
buffer.WriteInt(-1)
|
||||
@@ -18,7 +18,7 @@ func (protocol ${protocol_name}) read(buffer *ByteBuffer) any {
|
||||
}
|
||||
var beforeReadIndex = buffer.GetReadOffset()
|
||||
if length > 0 {
|
||||
buffer.SetReadOffset(beforeReadIndex + length)
|
||||
}
|
||||
buffer.SetReadOffset(beforeReadIndex + length)
|
||||
}
|
||||
return packet
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user