Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 61 for io (0.2 sec)

  1. src/bufio/bufio_test.go

    		}
    	}
    }
    
    func TestWriterReadFrom(t *testing.T) {
    	ws := []func(io.Writer) io.Writer{
    		func(w io.Writer) io.Writer { return onlyWriter{w} },
    		func(w io.Writer) io.Writer { return w },
    	}
    
    	rs := []func(io.Reader) io.Reader{
    		iotest.DataErrReader,
    		func(r io.Reader) io.Reader { return r },
    	}
    
    	for ri, rfunc := range rs {
    		for wi, wfunc := range ws {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  2. src/archive/zip/fuzz_test.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package zip
    
    import (
    	"bytes"
    	"io"
    	"os"
    	"path/filepath"
    	"testing"
    )
    
    func FuzzReader(f *testing.F) {
    	testdata, err := os.ReadDir("testdata")
    	if err != nil {
    		f.Fatalf("failed to read testdata directory: %s", err)
    	}
    	for _, de := range testdata {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jan 13 18:06:33 GMT 2022
    - 1.7K bytes
    - Viewed (0)
  3. src/archive/zip/reader_test.go

    	}
    	for i, f := range z.File {
    		r, err := f.Open()
    		if err != nil {
    			continue
    		}
    		if f.UncompressedSize64 < 1e6 {
    			n, err := io.Copy(io.Discard, r)
    			if i == 3 && err != io.ErrUnexpectedEOF {
    				t.Errorf("File[3] error = %v; want io.ErrUnexpectedEOF", err)
    			}
    			if err == nil && uint64(n) != f.UncompressedSize64 {
    				t.Errorf("file %d: bad size: copied=%d; want=%d", i, n, f.UncompressedSize64)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  4. src/bytes/buffer_test.go

    	err      error
    }{
    	{"", 0, []string{""}, io.EOF},
    	{"a\x00", 0, []string{"a\x00"}, nil},
    	{"abbbaaaba", 'b', []string{"ab", "b", "b", "aaab"}, nil},
    	{"hello\x01world", 1, []string{"hello\x01"}, nil},
    	{"foo\nbar", 0, []string{"foo\nbar"}, io.EOF},
    	{"alpha\nbeta\ngamma\n", '\n', []string{"alpha\n", "beta\n", "gamma\n"}, nil},
    	{"alpha\nbeta\ngamma", '\n', []string{"alpha\n", "beta\n", "gamma"}, io.EOF},
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 20 01:07:29 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  5. api/go1.5.txt

    pkg mime, type WordDecoder struct
    pkg mime, type WordDecoder struct, CharsetReader func(string, io.Reader) (io.Reader, error)
    pkg mime, type WordEncoder uint8
    pkg mime/quotedprintable, func NewReader(io.Reader) *Reader
    pkg mime/quotedprintable, func NewWriter(io.Writer) *Writer
    pkg mime/quotedprintable, method (*Reader) Read([]uint8) (int, error)
    pkg mime/quotedprintable, method (*Writer) Close() error
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jul 30 21:14:09 GMT 2015
    - 46.6K bytes
    - Viewed (0)
  6. src/archive/zip/register.go

    // The [io.ReadCloser]'s Close method must be used to release associated resources.
    // The Decompressor itself must be safe to invoke from multiple goroutines
    // simultaneously, but each returned reader will be used only by
    // one goroutine at a time.
    type Decompressor func(r io.Reader) io.ReadCloser
    
    var flateWriterPool sync.Pool
    
    func newFlateWriter(w io.Writer) io.WriteCloser {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  7. src/archive/tar/reader_test.go

    		{sparse[:511], 0, io.ErrUnexpectedEOF},
    		{sparse[:512], 0, io.ErrUnexpectedEOF},
    		{sparse[:3584], 1, io.EOF},
    		{sparse[:9200], 1, io.EOF}, // Terminate in padding of sparse header
    		{sparse[:9216], 1, io.EOF},
    		{sparse[:9728], 2, io.ErrUnexpectedEOF},
    		{sparse[:10240], 2, io.EOF},
    		{sparse[:11264], 2, io.ErrUnexpectedEOF},
    		{sparse, 5, io.EOF},
    		{sparse + trash, 5, io.EOF},
    	}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K bytes
    - Viewed (0)
  8. src/bytes/buffer.go

    // the buffer as needed. The return value n is the number of bytes read. Any
    // error except io.EOF encountered during the read is also returned. If the
    // buffer becomes too large, ReadFrom will panic with [ErrTooLarge].
    func (b *Buffer) ReadFrom(r io.Reader) (n int64, err error) {
    	b.lastRead = opInvalid
    	for {
    		i := b.grow(MinRead)
    		b.buf = b.buf[:i]
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  9. src/archive/tar/fuzz_test.go

    		type file struct {
    			header  *Header
    			content []byte
    		}
    		files := []file{}
    		for {
    			hdr, err := r.Next()
    			if err == io.EOF {
    				break
    			}
    			if err != nil {
    				return
    			}
    			buf := bytes.NewBuffer(nil)
    			if _, err := io.Copy(buf, r); err != nil {
    				continue
    			}
    			files = append(files, file{header: hdr, content: buf.Bytes()})
    		}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jan 13 18:06:33 GMT 2022
    - 2.2K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/cgotest/overlaydir.go

    // Copyright 2019 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package cgotest
    
    import (
    	"io"
    	"os"
    	"path/filepath"
    	"strings"
    )
    
    // OverlayDir makes a minimal-overhead copy of srcRoot in which new files may be added.
    func OverlayDir(dstRoot, srcRoot string) error {
    	dstRoot = filepath.Clean(dstRoot)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon May 22 20:56:09 GMT 2023
    - 1.7K bytes
    - Viewed (0)
Back to top