This repository has been archived on 2022-04-06. You can view files and clone it, but cannot push or open issues or pull requests.
|
package io
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
type nopWriter struct {
|
|
io.Writer
|
|
}
|
|
|
|
func (nopWriter) Close() error { return nil }
|
|
|
|
// NopCloser returns a ReadCloser with a no-op Close method wrapping
|
|
// the provided Reader r.
|
|
func NopCloser(w io.Writer) io.WriteCloser {
|
|
return nopWriter{w}
|
|
}
|