Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for WriteTo (0.2 sec)

  1. src/bytes/reader.go

    	}
    	r.i = abs
    	return abs, nil
    }
    
    // WriteTo implements the [io.WriterTo] interface.
    func (r *Reader) WriteTo(w io.Writer) (n int64, err error) {
    	r.prevRune = -1
    	if r.i >= int64(len(r.s)) {
    		return 0, nil
    	}
    	b := r.s[r.i:]
    	m, err := w.Write(b)
    	if m > len(b) {
    		panic("bytes.Reader.WriteTo: invalid Write count")
    	}
    	r.i += int64(m)
    	n = int64(m)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  2. src/archive/tar/reader.go

    	if err != nil && err != io.EOF {
    		tr.err = err
    	}
    	return n, err
    }
    
    // writeTo writes the content of the current file to w.
    // The bytes written matches the number of remaining bytes in the current file.
    //
    // If the current file is sparse and w is an io.WriteSeeker,
    // then writeTo uses Seek to skip past holes defined in Header.SparseHoles,
    // assuming that skipped regions are filled with NULs.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
Back to top