From 28e6f6d6751aaa0657ccdf9f330a7e6843b15ece Mon Sep 17 00:00:00 2001 From: Mario Trangoni Date: Tue, 17 Apr 2018 11:00:36 +0200 Subject: fix all gosimple issues --- sqlite3_test.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sqlite3_test.go') diff --git a/sqlite3_test.go b/sqlite3_test.go index 09e6727..8d65243 100644 --- a/sqlite3_test.go +++ b/sqlite3_test.go @@ -563,7 +563,7 @@ func TestBoolean(t *testing.T) { t.Fatalf("Expected 1 row but %v", counter) } - if id != 1 && fbool != true { + if id != 1 && !fbool { t.Fatalf("Value for id 1 should be %v, not %v", bool1, fbool) } @@ -585,7 +585,7 @@ func TestBoolean(t *testing.T) { t.Fatalf("Expected 1 row but %v", counter) } - if id != 2 && fbool != false { + if id != 2 && fbool { t.Fatalf("Value for id 2 should be %v, not %v", bool2, fbool) } @@ -1410,10 +1410,7 @@ func BenchmarkCustomFunctions(b *testing.B) { sql.Register("sqlite3_BenchmarkCustomFunctions", &SQLiteDriver{ ConnectHook: func(conn *SQLiteConn) error { // Impure function to force sqlite to reexecute it each time. - if err := conn.RegisterFunc("custom_add", customAdd, false); err != nil { - return err - } - return nil + return conn.RegisterFunc("custom_add", customAdd, false) }, }) }) -- cgit v1.2.3 From b75aefcf462ece8ce34da3f6e9d3877157506669 Mon Sep 17 00:00:00 2001 From: Mario Trangoni Date: Tue, 17 Apr 2018 11:42:17 +0200 Subject: fix small codespell issue --- sqlite3_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sqlite3_test.go') diff --git a/sqlite3_test.go b/sqlite3_test.go index 8d65243..5803042 100644 --- a/sqlite3_test.go +++ b/sqlite3_test.go @@ -1517,7 +1517,7 @@ func (db *TestDB) tearDown() { // q replaces ? parameters if needed func (db *TestDB) q(sql string) string { switch db.dialect { - case POSTGRESQL: // repace with $1, $2, .. + case POSTGRESQL: // replace with $1, $2, .. qrx := regexp.MustCompile(`\?`) n := 0 return qrx.ReplaceAllStringFunc(sql, func(string) string { -- cgit v1.2.3