style[golang]: replace space with tab

This commit is contained in:
godotg
2024-08-13 10:57:11 +08:00
parent 794693179c
commit 2c66183b5e
2 changed files with 6 additions and 6 deletions
@@ -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
}