Skip to content

Commit 5297f63

Browse files
authored
fmt: format code with go 1.19 (#1206)
close #1203
1 parent 8dfd147 commit 5297f63

File tree

11 files changed

+13
-15
lines changed

11 files changed

+13
-15
lines changed

drainer/binlog_item.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ func newBinlogItem(b *pb.Binlog, nodeID string) *binlogItem {
5050
return itemp
5151
}
5252

53-
//
5453
func (b *binlogItem) SetJob(job *model.Job) {
5554
b.job = job
5655
}

drainer/loopbacksync/loopbacksync.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ var CreateMarkTableDDL string = fmt.Sprintf("CREATE TABLE If Not Exists %s (%s b
4242
// CreateMarkDBDDL is DDL to create the database of mark table.
4343
var CreateMarkDBDDL = "create database IF NOT EXISTS retl;"
4444

45-
//LoopBackSync loopback sync info
45+
// LoopBackSync loopback sync info
4646
type LoopBackSync struct {
4747
ChannelID int64
4848
LoopbackControl bool
4949
SyncDDL bool
5050
}
5151

52-
//NewLoopBackSyncInfo return LoopBackSyncInfo objec
52+
// NewLoopBackSyncInfo return LoopBackSyncInfo objec
5353
func NewLoopBackSyncInfo(ChannelID int64, LoopbackControl, SyncDDL bool) *LoopBackSync {
5454
l := &LoopBackSync{
5555
ChannelID: ChannelID,

drainer/sync/mysql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
66
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
88
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,

drainer/sync/oracle_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
66
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
88
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,

drainer/sync/syncer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
66
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
88
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,

drainer/translator/oracle_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
66
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
88
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,

pkg/loader/load.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func Merge(v bool) Option {
194194
}
195195
}
196196

197-
//DestinationDBType set destDBType option.
197+
// DestinationDBType set destDBType option.
198198
func DestinationDBType(t string) Option {
199199
destDBType := DBTypeUnknown
200200
if t == "oracle" {
@@ -209,7 +209,7 @@ func DestinationDBType(t string) Option {
209209
}
210210
}
211211

212-
//SetloopBackSyncInfo set loop back sync info of loader
212+
// SetloopBackSyncInfo set loop back sync info of loader
213213
func SetloopBackSyncInfo(loopBackSyncInfo *loopbacksync.LoopBackSync) Option {
214214
return func(o *options) {
215215
o.loopBackSyncInfo = loopBackSyncInfo

pkg/loader/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func CreateDB(user string, password string, host string, port int, tls *tls.Conf
210210
return CreateDBWithSQLMode(user, password, host, port, tls, nil, nil, time.Minute)
211211
}
212212

213-
//CreateOracleDB create Oracle DB connection and return it
213+
// CreateOracleDB create Oracle DB connection and return it
214214
func CreateOracleDB(user string, password string, host string, port int, serviceName, connectString string) (db *gosql.DB, err error) {
215215
loc, err := time.LoadLocation("Local")
216216
if err != nil {

pkg/sql/sql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ func GetTidbPosition(db *sql.DB) (int64, error) {
206206
return ts, nil
207207
}
208208

209-
//GetOraclePosition return oracle scn
209+
// GetOraclePosition return oracle scn
210210
func GetOraclePosition(db *sql.DB) (int64, error) {
211211
rows, err := db.Query("select dbms_flashback.get_system_change_number as current_scn from dual")
212212
if err != nil {

pump/storage/sorter.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ func newItemGenerator(txnNum int32, maxLatency int64, fakeTxnPerNum int32) <-cha
8686
return items
8787
}
8888

89-
/// sorter
9089
type sortItem struct {
9190
start int64
9291
commit int64

0 commit comments

Comments
 (0)