Skip to content

Commit ae1b091

Browse files
committed
fix some golangci-lint checking errors
Signed-off-by: axfor <aixiaoxiang2009@hotmail.com>
1 parent c2fea88 commit ae1b091

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

canal/sync.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,7 @@ type Position struct {
339339

340340
// handleQueryEvent is handle some common query events (e.g., DDL,CREATE or DROP USER,GRANT),
341341
// others use UnknownQueryEvent unified callbacks to expose to users
342-
func (c *Canal) handleQueryEvent(ev *replication.BinlogEvent, e *replication.QueryEvent,
343-
stmt ast.StmtNode, pos *Position) error {
344-
342+
func (c *Canal) handleQueryEvent(ev *replication.BinlogEvent, e *replication.QueryEvent, stmt ast.StmtNode, pos *Position) error {
345343
switch t := stmt.(type) {
346344
case *ast.RenameTableStmt, *ast.AlterTableStmt, *ast.DropTableStmt, *ast.CreateTableStmt, *ast.TruncateTableStmt:
347345
return c.handleDDLEvent(ev, e, t, pos)
@@ -350,8 +348,7 @@ func (c *Canal) handleQueryEvent(ev *replication.BinlogEvent, e *replication.Que
350348
}
351349
}
352350

353-
func (c *Canal) handleDDLEvent(ev *replication.BinlogEvent, e *replication.QueryEvent,
354-
stmt ast.StmtNode, pos *Position) error {
351+
func (c *Canal) handleDDLEvent(ev *replication.BinlogEvent, e *replication.QueryEvent, stmt ast.StmtNode, pos *Position) error {
355352
nodes := parseStmt(stmt)
356353
for _, node := range nodes {
357354
if node.db == "" {

0 commit comments

Comments
 (0)