Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
abound
· 2y ago · 0 comments
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.
Comments
[–]
manlobster
2y ago
True, but both of these are for relatively slow operations, where the performance of the error checking is relatively insignificant.
[–]
zachmu
2y ago
It has also become somewhat common to use io.EOF to signal the end of iteration, like the reader libraries do.