diff --git a/protocol/src/main/resources/golang/ProtocolRegistrationTemplate.go b/protocol/src/main/resources/golang/ProtocolRegistrationTemplate.go index 654302d2..35098547 100644 --- a/protocol/src/main/resources/golang/ProtocolRegistrationTemplate.go +++ b/protocol/src/main/resources/golang/ProtocolRegistrationTemplate.go @@ -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 } diff --git a/protocol/src/main/resources/golang/ProtocolRegistrationTemplateEmpty.go b/protocol/src/main/resources/golang/ProtocolRegistrationTemplateEmpty.go index 3f09d843..62dd2d22 100644 --- a/protocol/src/main/resources/golang/ProtocolRegistrationTemplateEmpty.go +++ b/protocol/src/main/resources/golang/ProtocolRegistrationTemplateEmpty.go @@ -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 }