Return EOF if Nop ReadWriteCloser is used

This commit is contained in:
Elara 2022-09-30 16:25:40 -07:00
parent fa76d95c04
commit 77c3ea7d56
1 changed files with 2 additions and 2 deletions

View File

@ -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 {