diff --git a/README.md b/README.md index 59a5d93d9b79866c138191452ba1094870f34eb8..8f547fb0623a8b673b260401094210b86dc48a40 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ if err != nil { person := struct{ Name string }{} -for true { +for { // res.Next() will accept a pointer to map or struct. err = res.Next(&person) if err != nil { diff --git a/mongo/mongo_test.go b/mongo/mongo_test.go index ed607055812a6869579b3b7f19c5b665e8683a29..3f365141ccb2093a4bce34f2db798f1018f50643 100644 --- a/mongo/mongo_test.go +++ b/mongo/mongo_test.go @@ -398,7 +398,7 @@ func TestFind(t *testing.T) { dst5 := struct{ Name string }{} found := false - for true { + for { err = res.Next(&dst5) if err != nil { break diff --git a/mysql/mysql_test.go b/mysql/mysql_test.go index dc161b5e9f6bb18546bb9747ba115e24e32cb50d..4d06631abfa006b7da7939b19b45123ff9a13a83 100644 --- a/mysql/mysql_test.go +++ b/mysql/mysql_test.go @@ -307,7 +307,7 @@ func TestFind(t *testing.T) { dst5 := struct{ Name string }{} found := false - for true { + for { err = res.Next(&dst5) if err != nil { break diff --git a/postgresql/postgresql_test.go b/postgresql/postgresql_test.go index 9f03f03d28d44244ff305539746e06a55133f968..11e500720e5fb35fb81bbf280941ec25e1b3cd2f 100644 --- a/postgresql/postgresql_test.go +++ b/postgresql/postgresql_test.go @@ -307,7 +307,7 @@ func TestFind(t *testing.T) { dst5 := struct{ Name string }{} found := false - for true { + for { err = res.Next(&dst5) if err != nil { break diff --git a/sqlite/_dumps/gotest.sqlite3.db b/sqlite/_dumps/gotest.sqlite3.db index 674abae720e5ebd0fa64694398c1920ad35188d9..b9287c50c1acf31d682fd2d50b047dc9dae72859 100644 Binary files a/sqlite/_dumps/gotest.sqlite3.db and b/sqlite/_dumps/gotest.sqlite3.db differ diff --git a/sqlite/sqlite_test.go b/sqlite/sqlite_test.go index 3126449dac945b3304556dec478eda0809a73046..dde0fd7c348c8fc4ac76c0cd86c6ffd06da0ce5c 100644 --- a/sqlite/sqlite_test.go +++ b/sqlite/sqlite_test.go @@ -298,7 +298,7 @@ func TestFind(t *testing.T) { dst5 := struct{ Name string }{} found := false - for true { + for { err = res.Next(&dst5) if err != nil { break