3 ms·
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.
by fpoling 8y 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.
- kuschku 8y agoThat database object is from https://golang.org/pkg/database/sql/ https://golang.org/pkg/database/sql/ which is part of the standard library of go.