Skip to content

Commit

Permalink
x/website: fix bad indentation in tutorial -> database-access
Browse files Browse the repository at this point in the history
Change-Id: I0ba4e67c02827aa8a985b24dbc208412a0721729
GitHub-Last-Rev: 463be1c
GitHub-Pull-Request: #84
Reviewed-on: https://go-review.googlesource.com/c/website/+/344371
Reviewed-by: Akhil Indurti <aindurti@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
  • Loading branch information
daiwt authored and rsc committed Sep 15, 2021
1 parent 2812d56 commit 6f85544
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _content/doc/tutorial/database-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ For SQL statements you know will return at most a single row, you can use
var alb Album
row := db.QueryRow("SELECT * FROM album WHERE id = ?", id)
if err := row.Scan(&alb.ID, &alb.Title, &alb.Artist, &alb.Price); err != nil {
if err := row.Scan(&alb.ID, &alb.Title, &alb.Artist, &alb.Price); err != nil {
if err == sql.ErrNoRows {
return alb, fmt.Errorf("albumsById %d: no such album", id)
}
Expand Down

0 comments on commit 6f85544

Please sign in to comment.