From cc53c8c78701b1a705019dc03ace5761ea7e135d Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Wed, 8 Jan 2025 08:17:04 -0500 Subject: [PATCH] Use const literal for byte index Signed-off-by: Matt Lord --- go/mysql/binlog_event_common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/mysql/binlog_event_common.go b/go/mysql/binlog_event_common.go index 4fe61d7979e..0bd9d401eaa 100644 --- a/go/mysql/binlog_event_common.go +++ b/go/mysql/binlog_event_common.go @@ -121,7 +121,7 @@ func (ev binlogEvent) Length() uint32 { // NextPosition returns the nextPosition field from the header func (ev binlogEvent) NextPosition() uint64 { // Only 4 bytes are used for the next_position field in the header. - return uint64(binary.LittleEndian.Uint32(ev.Bytes()[13 : 13+4])) + return uint64(binary.LittleEndian.Uint32(ev.Bytes()[13:17])) } // IsFormatDescription implements BinlogEvent.IsFormatDescription().