Return EOF if Nop ReadWriteCloser is used
This commit is contained in:
parent
fa76d95c04
commit
77c3ea7d56
|
@ -43,11 +43,11 @@ func NopOpen(context.Context, string, int, os.FileMode) (io.ReadWriteCloser, err
|
|||
type NopRWC struct{}
|
||||
|
||||
func (NopRWC) Read([]byte) (int, error) {
|
||||
return 0, os.ErrClosed
|
||||
return 0, io.EOF
|
||||
}
|
||||
|
||||
func (NopRWC) Write([]byte) (int, error) {
|
||||
return 0, os.ErrClosed
|
||||
return 0, io.EOF
|
||||
}
|
||||
|
||||
func (NopRWC) Close() error {
|
||||
|
|
Loading…
Reference in New Issue