Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Fix mixed spaces and tabs in Surprises code samples #75

Merged
merged 1 commit into from
Mar 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions surprises.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ rows, err := db.Query("select * from tbl1") // Uses connection 1
for rows.Next() {
err = rows.Scan(&myvariable)
// The following line will NOT use connection 1, which is already in-use
db.Query("select * from tbl2 where id = ?", myvariable)
db.Query("select * from tbl2 where id = ?", myvariable)
}
</pre>

Expand All @@ -130,7 +130,7 @@ rows, err := tx.Query("select * from tbl1") // Uses tx's connection
for rows.Next() {
err = rows.Scan(&myvariable)
// ERROR! tx's connection is already busy!
tx.Query("select * from tbl2 where id = ?", myvariable)
tx.Query("select * from tbl2 where id = ?", myvariable)
}
</pre>

Expand Down