- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 84 for readPart (0.37 sec)
-
src/mime/multipart/multipart_test.go
if err != nil { t.Fatalf("Part %d: ReadAll failed: %v", i, err) } i++ } readPart(textproto.MIMEHeader{"Foo-Bar": {"baz"}}, "Body") select { case <-done1: t.Errorf("Reader read past second boundary") default: } readPart(textproto.MIMEHeader{"Foo-Bar": {"bop"}}, "Body 2") } func TestLineContinuation(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 17:36:47 UTC 2022 - 30.4K bytes - Viewed (0) -
cmd/erasure-decode.go
type parallelReader struct { readers []io.ReaderAt orgReaders []io.ReaderAt dataBlocks int offset int64 shardSize int64 shardFileSize int64 buf [][]byte readerToBuf []int stashBuffer []byte } // newParallelReader returns parallelReader. func newParallelReader(readers []io.ReaderAt, e Erasure, offset, totalLength int64) *parallelReader {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 21 14:36:21 UTC 2024 - 9.4K bytes - Viewed (0) -
src/strings/reader.go
return 0, io.EOF } r.prevRune = -1 n = copy(b, r.s[r.i:]) r.i += int64(n) return } // ReadAt implements the [io.ReaderAt] interface. func (r *Reader) ReadAt(b []byte, off int64) (n int, err error) { // cannot modify state - see io.ReaderAt if off < 0 { return 0, errors.New("strings.Reader.ReadAt: negative offset") } if off >= int64(len(r.s)) { return 0, io.EOF } n = copy(b, r.s[off:])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:10:31 UTC 2023 - 3.9K bytes - Viewed (0) -
src/testing/iotest/reader.go
return fmt.Errorf("ReadAt(%d, 0) = %q\n\twant %q", len(data), data, content) } n, err = r.ReadAt(data[:1], int64(len(data))) if n != 0 || err != io.EOF { return fmt.Errorf("ReadAt(1, %d) = %v, %v, want 0, EOF", len(data), n, err) } for i := range data { data[i] = 0xfe } n, err = r.ReadAt(data[:cap(data)], 0) if n != len(data) || err != io.EOF {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:47 UTC 2023 - 8K bytes - Viewed (0) -
src/embed/internal/embedtest/embed_test.go
t.Fatal("Seek:", off) } // Use ReadAt to read the entire file, ignoring the offset. at := file.(io.ReaderAt) got = make([]byte, len(want)) n, err = at.ReadAt(got, 0) if err != nil { t.Fatal("ReadAt:", err) } if n != len(want) { t.Fatalf("ReadAt: got %d bytes, want %d bytes", n, len(want)) } if string(got) != want { t.Fatalf("ReadAt: got %q, want %q", got, want) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 14 20:10:16 UTC 2023 - 5.4K bytes - Viewed (0) -
src/io/io.go
// // If ReadAt is reading from an input source with a seek offset, // ReadAt should not affect nor be affected by the underlying // seek offset. // // Clients of ReadAt can execute parallel ReadAt calls on the // same input source. // // Implementations must not retain p. type ReaderAt interface { ReadAt(p []byte, off int64) (n int, err error) } // WriterAt is the interface that wraps the basic WriteAt method. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 17:34:10 UTC 2024 - 21.6K bytes - Viewed (0) -
src/debug/pe/section.go
type Section struct { SectionHeader Relocs []Reloc // Embed ReaderAt for ReadAt method. // Do not embed SectionReader directly // to avoid having Read and Seek. // If a client wants Read and Seek it must use // Open() to avoid fighting over the seek offset // with other clients. io.ReaderAt sr *io.SectionReader } // Data reads and returns the contents of the PE section s. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 18 19:33:30 UTC 2023 - 3.5K bytes - Viewed (0) -
src/debug/plan9obj/file.go
type Section struct { SectionHeader // Embed ReaderAt for ReadAt method. // Do not embed SectionReader directly // to avoid having Read and Seek. // If a client wants Read and Seek it must use // Open() to avoid fighting over the seek offset // with other clients. io.ReaderAt sr *io.SectionReader } // Data reads and returns the contents of the Plan 9 a.out section.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 18 19:33:30 UTC 2023 - 7.2K bytes - Viewed (0) -
src/internal/saferio/io.go
func ReadDataAt(r io.ReaderAt, n uint64, off int64) ([]byte, error) { if int64(n) < 0 || n != uint64(int(n)) { // n is too large to fit in int, so we can't allocate // a buffer large enough. Treat this as a read failure. return nil, io.ErrUnexpectedEOF } if n < chunk { buf := make([]byte, n) _, err := r.ReadAt(buf, off) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 31 00:34:05 UTC 2023 - 3.4K bytes - Viewed (0) -
src/go/internal/gccgoimporter/ar.go
// This is only safe because there won't be any concurrent seeks // while this code is executing. func readerAtFromSeeker(rs io.ReadSeeker) io.ReaderAt { if ret, ok := rs.(io.ReaderAt); ok { return ret } return seekerReadAt{rs} } type seekerReadAt struct { seeker io.ReadSeeker } func (sra seekerReadAt) ReadAt(p []byte, off int64) (int, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 30 14:14:36 UTC 2022 - 4.4K bytes - Viewed (0)