go-zero/core/iox/nopcloser.go
2020-07-26 17:09:05 +08:00

16 lines
180 B
Go

package iox
import "io"
type nopCloser struct {
io.Writer
}
func (nopCloser) Close() error {
return nil
}
func NopCloser(w io.Writer) io.WriteCloser {
return nopCloser{w}
}