Merge pull request #231 from marccampbell/master

Fix example to check the correct error value
This commit is contained in:
mattn 2015-08-26 01:33:44 +09:00
commit 897b8800a7
1 changed files with 7 additions and 7 deletions

View File

@ -10,12 +10,12 @@ import (
func main() { func main() {
sqlite3conn := []*sqlite3.SQLiteConn{} sqlite3conn := []*sqlite3.SQLiteConn{}
sql.Register("sqlite3_with_hook_example", sql.Register("sqlite3_with_hook_example",
&sqlite3.SQLiteDriver{ &sqlite3.SQLiteDriver{
ConnectHook: func(conn *sqlite3.SQLiteConn) error { ConnectHook: func(conn *sqlite3.SQLiteConn) error {
sqlite3conn = append(sqlite3conn, conn) sqlite3conn = append(sqlite3conn, conn)
return nil return nil
}, },
}) })
os.Remove("./foo.db") os.Remove("./foo.db")
os.Remove("./bar.db") os.Remove("./bar.db")
@ -54,7 +54,7 @@ func main() {
log.Fatal(err) log.Fatal(err)
} }
bk.Step(-1) _, err = bk.Step(-1)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }