fix all gosimple issues

This commit is contained in:
Mario Trangoni 2018-04-17 11:00:36 +02:00
parent 847660225d
commit 28e6f6d675
1 changed files with 3 additions and 6 deletions

View File

@ -563,7 +563,7 @@ func TestBoolean(t *testing.T) {
t.Fatalf("Expected 1 row but %v", counter) 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) 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) 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) 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{ sql.Register("sqlite3_BenchmarkCustomFunctions", &SQLiteDriver{
ConnectHook: func(conn *SQLiteConn) error { ConnectHook: func(conn *SQLiteConn) error {
// Impure function to force sqlite to reexecute it each time. // Impure function to force sqlite to reexecute it each time.
if err := conn.RegisterFunc("custom_add", customAdd, false); err != nil { return conn.RegisterFunc("custom_add", customAdd, false)
return err
}
return nil
}, },
}) })
}) })