Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for SectionReader (0.23 sec)

  1. test/fixedbugs/bug345.dir/main.go

    	//	io.Writer does not implement io.Writer (missing Write method)
    	// main.go:27: cannot use &x (type *"io".SectionReader) as type *"/Users/rsc/g/go/test/fixedbugs/bug345.dir/io".SectionReader in function argument
    
    	var w io.Writer
    	bufio.NewWriter(w) // ERROR "[\w.]+[^.]/io|has incompatible type|cannot use"
    	var x goio.SectionReader
    	io.SR(&x) // ERROR "[\w.]+[^.]/io|has incompatible type|cannot use"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 19 06:26:35 UTC 2021
    - 978 bytes
    - Viewed (0)
  2. test/fixedbugs/bug345.dir/io.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package io
    
    type Writer interface {
    	WrongWrite()
    }
    
    type SectionReader struct {
    	X int
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 278 bytes
    - Viewed (0)
  3. src/debug/pe/section.go

    // Section provides access to PE COFF section.
    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)
  4. test/fixedbugs/issue44266.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    import "io"
    
    type T1 interface {
    	io.Reader
    }
    
    type T2 struct {
    	io.SectionReader
    }
    
    type T3 struct { // ERROR "invalid recursive type: T3 refers to itself"
    	T1
    	T2
    	parent T3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 29 14:21:33 UTC 2022
    - 364 bytes
    - Viewed (0)
  5. src/io/io.go

    		// Assume we can read up to an offset of 1<<63 - 1.
    		remaining = maxint64
    	}
    	return &SectionReader{r, off, off, remaining, n}
    }
    
    // SectionReader implements Read, Seek, and ReadAt on a section
    // of an underlying [ReaderAt].
    type SectionReader struct {
    	r     ReaderAt // constant after creation
    	base  int64    // constant after creation
    	off   int64
    	limit int64 // constant after creation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:34:10 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  6. src/internal/saferio/io_test.go

    	t.Run("maxint", func(t *testing.T) {
    		_, err := ReadDataAt(bytes.NewReader(input), 1<<62, 0)
    		if err == nil {
    			t.Error("large read succeeded unexpectedly")
    		}
    	})
    
    	t.Run("SectionReader", func(t *testing.T) {
    		// Reading 0 bytes from an io.SectionReader at the end
    		// of the section will return EOF, but ReadDataAt
    		// should succeed and return 0 bytes.
    		sr := io.NewSectionReader(bytes.NewReader(input), 0, 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 00:34:05 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  7. src/debug/plan9obj/file.go

    	closer   io.Closer
    }
    
    // A SectionHeader represents a single Plan 9 a.out section header.
    // This structure doesn't exist on-disk, but eases navigation
    // through the object file.
    type SectionHeader struct {
    	Name   string
    	Size   uint32
    	Offset uint32
    }
    
    // A Section represents a single section in a Plan 9 a.out file.
    type Section struct {
    	SectionHeader
    
    	// Embed ReaderAt for ReadAt method.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  8. src/internal/saferio/io.go

    		// 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 {
    			// io.SectionReader can return EOF for n == 0,
    			// but for our purposes that is a success.
    			if err != io.EOF || n > 0 {
    				return nil, err
    			}
    		}
    		return buf, nil
    	}
    
    	var buf []byte
    	buf1 := make([]byte, chunk)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 00:34:05 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  9. src/debug/macho/file.go

    	Scattered bool
    }
    
    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
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  10. src/internal/xcoff/ar.go

    // ArchiveHeader holds information about a big archive file header
    type ArchiveHeader struct {
    	magic string
    }
    
    // Member represents a member of an AIX big archive.
    type Member struct {
    	MemberHeader
    	sr *io.SectionReader
    }
    
    // MemberHeader holds information about a big archive member
    type MemberHeader struct {
    	Name string
    	Size uint64
    }
    
    // OpenArchive opens the named archive using os.Open and prepares it for use
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:32:51 UTC 2024
    - 5.6K bytes
    - Viewed (0)
Back to top