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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: