- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for mustReadFull (0.06 sec)
-
src/archive/tar/reader.go
} type zeroReader struct{} func (zeroReader) Read(b []byte) (int, error) { clear(b) return len(b), nil } // mustReadFull is like io.ReadFull except it returns // io.ErrUnexpectedEOF when io.EOF is hit before len(b) bytes are read. func mustReadFull(r io.Reader, b []byte) (int, error) { n, err := tryReadFull(r, b) if err == io.EOF { err = io.ErrUnexpectedEOF } return n, err }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Mar 08 01:59:14 UTC 2024 - 26.8K bytes - Viewed (0) -
src/archive/tar/writer.go
} } // If the last fragment is a hole, then seek to 1-byte before EOF, and // read a single byte to ensure the file is the right size. if readLastByte && err == nil { _, err = mustReadFull(rs, []byte{0}) sw.pos++ } n = sw.pos - pos0 switch { case err == io.EOF: return n, io.ErrUnexpectedEOF case err == ErrWriteTooLong:
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Oct 02 14:22:59 UTC 2024 - 19.6K bytes - Viewed (0)