Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ensureEOF (0.04 sec)

  1. src/archive/tar/writer.go

    func (zeroWriter) Write(b []byte) (int, error) {
    	for i, c := range b {
    		if c != 0 {
    			return i, errWriteHole
    		}
    	}
    	return len(b), nil
    }
    
    // ensureEOF checks whether r is at EOF, reporting ErrWriteTooLong if not so.
    func ensureEOF(r io.Reader) error {
    	n, err := tryReadFull(r, []byte{0})
    	switch {
    	case n > 0:
    		return ErrWriteTooLong
    	case err == io.EOF:
    		return nil
    	default:
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Oct 02 14:22:59 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top