goext/langext/io.go

16 lines
200 B
Go
Raw Normal View History

2024-08-25 17:36:20 +02:00
package langext
import "io"
type nopCloser struct {
io.Writer
}
func (n nopCloser) Close() error {
return nil // no op
}
func WriteNopCloser(w io.Writer) io.WriteCloser {
return nopCloser{w}
}