Y
Hacker News
new
|
ask
|
show
|
jobs
by
Matt3o12_
4049 days ago
If you just need a close that does not do anything, go has a pretty cool wrapper: `ioutil.NoopCloser`. It takes a reader and returns a reader that can be closed `io.ReadCloser`. Very useful for testing/mocking