Hacker News new | ask | show | jobs
by abound 753 days ago
There are at least two places in the standard library that behave like this: sql.ErrNoRows and the error thrown by os.Open when a file doesn't exist.
1 comments

True, but both of these are for relatively slow operations, where the performance of the error checking is relatively insignificant.
It has also become somewhat common to use io.EOF to signal the end of iteration, like the reader libraries do.