Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: