Search Options

Display Count
Sort
Preferred Language
Advanced Search

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

The search processing time has exceeded the limit. The displayed results may be partial.

  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:
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Mon Feb 03 16:38:43 GMT 2025
    - 19.7K bytes
    - Click Count (0)
Back to Top