@@ -101,7 +101,7 @@ func (h *EventHeader) Decode(data []byte) error {
101
101
}
102
102
103
103
func (h * EventHeader ) Dump (w io.Writer ) {
104
- fmt .Fprintf (w , "=== %s ===\n " , EventType ( h .EventType ) )
104
+ fmt .Fprintf (w , "=== %s ===\n " , h .EventType )
105
105
fmt .Fprintf (w , "Date: %s\n " , time .Unix (int64 (h .Timestamp ), 0 ).Format (TimeFormat ))
106
106
fmt .Fprintf (w , "Log position: %d\n " , h .LogPos )
107
107
fmt .Fprintf (w , "Event size: %d\n " , h .EventSize )
@@ -310,7 +310,7 @@ func (e *QueryEvent) Decode(data []byte) error {
310
310
e .ExecutionTime = binary .LittleEndian .Uint32 (data [pos :])
311
311
pos += 4
312
312
313
- schemaLength := uint8 ( data [pos ])
313
+ schemaLength := data [pos ]
314
314
pos ++
315
315
316
316
e .ErrorCode = binary .LittleEndian .Uint16 (data [pos :])
@@ -369,15 +369,15 @@ type GTIDEvent struct {
369
369
370
370
func (e * GTIDEvent ) Decode (data []byte ) error {
371
371
pos := 0
372
- e .CommitFlag = uint8 ( data [pos ])
372
+ e .CommitFlag = data [pos ]
373
373
pos ++
374
374
e .SID = data [pos : pos + SidLength ]
375
375
pos += SidLength
376
376
e .GNO = int64 (binary .LittleEndian .Uint64 (data [pos :]))
377
377
pos += 8
378
378
379
379
if len (data ) >= 42 {
380
- if uint8 ( data [pos ]) == LogicalTimestampTypeCode {
380
+ if data [pos ] == LogicalTimestampTypeCode {
381
381
pos ++
382
382
e .LastCommitted = int64 (binary .LittleEndian .Uint64 (data [pos :]))
383
383
pos += PartLogicalTimestampLength
@@ -511,7 +511,7 @@ func (e *ExecuteLoadQueryEvent) Decode(data []byte) error {
511
511
e .ExecutionTime = binary .LittleEndian .Uint32 (data [pos :])
512
512
pos += 4
513
513
514
- e .SchemaLength = uint8 ( data [pos ])
514
+ e .SchemaLength = data [pos ]
515
515
pos ++
516
516
517
517
e .ErrorCode = binary .LittleEndian .Uint16 (data [pos :])
@@ -529,7 +529,7 @@ func (e *ExecuteLoadQueryEvent) Decode(data []byte) error {
529
529
e .EndPos = binary .LittleEndian .Uint32 (data [pos :])
530
530
pos += 4
531
531
532
- e .DupHandlingFlags = uint8 ( data [pos ])
532
+ e .DupHandlingFlags = data [pos ]
533
533
534
534
return nil
535
535
}
@@ -602,7 +602,7 @@ func (e *MariadbGTIDEvent) Decode(data []byte) error {
602
602
pos += 8
603
603
e .GTID .DomainID = binary .LittleEndian .Uint32 (data [pos :])
604
604
pos += 4
605
- e .Flags = uint8 ( data [pos ])
605
+ e .Flags = data [pos ]
606
606
pos += 1
607
607
608
608
if (e .Flags & BINLOG_MARIADB_FL_GROUP_COMMIT_ID ) > 0 {
0 commit comments