Skip to content

Commit fd885f9

Browse files
committed
docs: change printf
1 parent 2ba59fd commit fd885f9

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

pkg/sgorm/mysql/mysql_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package mysql
22

33
import (
4-
"fmt"
54
"testing"
65
"time"
76

@@ -13,7 +12,7 @@ func TestInitMysql(t *testing.T) {
1312
db, err := Init(dsn, WithEnableTrace())
1413
if err != nil {
1514
// ignore test error about not being able to connect to real mysql
16-
t.Logf(fmt.Sprintf("connect to mysql failed, err=%v, dsn=%s", err, dsn))
15+
t.Logf("connect to mysql failed, err=%v, dsn=%s", err, dsn)
1716
return
1817
}
1918
defer Close(db)
@@ -26,7 +25,7 @@ func TestInitTidb(t *testing.T) {
2625
db, err := InitTidb(dsn)
2726
if err != nil {
2827
// ignore test error about not being able to connect to real tidb
29-
t.Logf(fmt.Sprintf("connect to mysql failed, err=%v, dsn=%s", err, dsn))
28+
t.Logf("connect to mysql failed, err=%v, dsn=%s", err, dsn)
3029
return
3130
}
3231
defer Close(db)

pkg/sgorm/postgresql/postgresql_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package postgresql
22

33
import (
4-
"fmt"
54
"testing"
65
"time"
76

@@ -13,7 +12,7 @@ func TestInit(t *testing.T) {
1312
db, err := Init(dsn, WithEnableTrace())
1413
if err != nil {
1514
// ignore test error about not being able to connect to real postgresql
16-
t.Logf(fmt.Sprintf("connect to postgresql failed, err=%v, dsn=%s", err, dsn))
15+
t.Logf("connect to postgresql failed, err=%v, dsn=%s", err, dsn)
1716
return
1817
}
1918
defer Close(db)

pkg/sgorm/query/query_condition.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func (c *Column) checkExp() (string, error) {
190190
symbol = ""
191191
}
192192
} else {
193-
return symbol, fmt.Errorf("unsported exp type '%s'", c.Exp)
193+
return symbol, fmt.Errorf("unsupported exp type '%s'", c.Exp)
194194
}
195195

196196
if c.Logic == "" {
@@ -200,7 +200,7 @@ func (c *Column) checkExp() (string, error) {
200200
if _, ok := logicMap[logic]; ok { //nolint
201201
c.Logic = logic
202202
} else {
203-
return symbol, fmt.Errorf("unsported logic type '%s'", c.Logic)
203+
return symbol, fmt.Errorf("unsupported logic type '%s'", c.Logic)
204204
}
205205
}
206206

pkg/sgorm/sqlite/sqlite_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package sqlite
22

33
import (
4-
"fmt"
54
"testing"
65
"time"
76

@@ -13,7 +12,7 @@ func TestInit(t *testing.T) {
1312
db, err := Init(dbFile)
1413
if err != nil {
1514
// ignore test error about not being able to connect to real sqlite
16-
t.Logf(fmt.Sprintf("connect to sqlite failed, err=%v, dbFile=%s", err, dbFile))
15+
t.Logf("connect to sqlite failed, err=%v, dbFile=%s", err, dbFile)
1716
return
1817
}
1918
defer Close(db)

0 commit comments

Comments
 (0)