jx/internal/ext/nopwritecloser.go

18 lines
287 B
Go
Raw Permalink Normal View History

2024-07-17 08:16:51 +00:00
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package ext
import (
"io"
)
func WriteNopCloser(w io.Writer) io.WriteCloser {
return writeNopCloser{w}
}
type writeNopCloser struct {
io.Writer
}
func (writeNopCloser) Close() error { return nil }