Failing WriteAt should return ErrShortWrite

See the implementation of io.Copy.
This commit is contained in:
Matt Joiner 2013-10-02 19:54:23 +10:00
parent 7bc8524d24
commit 381c6bef68
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ func (me MMapSpan) WriteAt(p []byte, off int64) (n int, err error) {
return len(p) == 0 return len(p) == 0
}) })
if len(p) != 0 { if len(p) != 0 {
err = io.EOF err = io.ErrShortWrite
} }
return return
} }