Hacker News new | ask | show | jobs
by azylman 4084 days ago
A Hash's Write method can't return an errors.

Writing and Reading to a pipe only errors if the pipe has been closed. We return an io.Reader, instead of an io.ReadCloser, so consumers can't close the Read side. Internally, the Write side is never closed either. So, in practice, Reading and Writing also won't ever error.