Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for interfaces (0.19 sec)

  1. src/bytes/reader.go

    func (r *Reader) Size() int64 { return int64(len(r.s)) }
    
    // Read implements the [io.Reader] interface.
    func (r *Reader) Read(b []byte) (n int, err error) {
    	if r.i >= int64(len(r.s)) {
    		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) {
    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. internal/s3select/parquet/reader.go

    // ConvertedType annotations. Ref:
    // https://github.com/apache/parquet-format/blob/master/LogicalTypes.md
    func convertFromAnnotation(se *parquettypes.SchemaElement, v interface{}) (interface{}, error) {
    	if se == nil {
    		return v, nil
    	}
    
    	var value interface{}
    	switch val := v.(type) {
    	case []byte:
    		// TODO: only strings are supported in s3select output (not
    		// binary arrays) - perhaps we need to check the annotation to
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 14 13:54:47 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  3. internal/etag/reader.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package etag
    
    import (
    	"context"
    	"crypto/md5"
    	"fmt"
    	"hash"
    	"io"
    )
    
    // Tagger is the interface that wraps the basic ETag method.
    type Tagger interface {
    	ETag() ETag
    }
    
    type wrapReader struct {
    	io.Reader
    	Tagger
    }
    
    var _ Tagger = wrapReader{} // compiler check
    
    // ETag returns the ETag of the underlying Tagger.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  4. src/archive/tar/reader.go

    	// err is a persistent error.
    	// It is only the responsibility of every exported method of Reader to
    	// ensure that this error is sticky.
    	err error
    }
    
    type fileReader interface {
    	io.Reader
    	fileState
    
    	WriteTo(io.Writer) (int64, error)
    }
    
    // NewReader creates a new [Reader] reading from r.
    func NewReader(r io.Reader) *Reader {
    	return &Reader{r: r, curr: &regFileReader{r, 0}}
    }
    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)
  5. internal/s3select/csv/reader.go

    			// Copy column names since records will be reused.
    			columns := append(make([]string, 0, len(record)), record...)
    			r.columnNames = columns
    		}
    	}
    
    	r.bufferPool.New = func() interface{} {
    		return make([]byte, csvSplitSize+1024)
    	}
    
    	// Return first block
    	next, nextErr := r.nextSplit(csvSplitSize, r.bufferPool.Get().([]byte))
    	// Check if first block is valid.
    	if !utf8.Valid(next) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  6. src/archive/zip/reader.go

    // If file == nil, the fileListEntry describes a directory without metadata.
    type fileListEntry struct {
    	name  string
    	file  *File
    	isDir bool
    	isDup bool
    }
    
    type fileInfoDirEntry interface {
    	fs.FileInfo
    	fs.DirEntry
    }
    
    func (f *fileListEntry) stat() (fileInfoDirEntry, error) {
    	if f.isDup {
    		return nil, errors.New(f.name + ": duplicate entries in zip file")
    	}
    	if !f.isDir {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
Back to top