Files
stfs/internal/ioext/flusher.go
2021-12-08 21:44:57 +01:00

20 lines
249 B
Go

package ioext
import "io"
type Flusher interface {
io.WriteCloser
Flush() error
}
type NopFlusher struct {
io.WriteCloser
}
func (NopFlusher) Flush() error { return nil }
func AddFlush(w io.WriteCloser) NopFlusher {
return NopFlusher{w}
}