Hacker News new | ask | show | jobs
by _0w8t 2942 days ago
That code can be simplified a lot if the db object stores the error itself so it can be checked only once after few calls, like what bufio.Scanner does.
1 comments

That database object is from https://golang.org/pkg/database/sql/ which is part of the standard library of go.