nopcloser.go 180 B

123456789101112131415
  1. package iox
  2. import "io"
  3. type nopCloser struct {
  4. io.Writer
  5. }
  6. func (nopCloser) Close() error {
  7. return nil
  8. }
  9. func NopCloser(w io.Writer) io.WriteCloser {
  10. return nopCloser{w}
  11. }