- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for writerFor (0.04 seconds)
-
src/bytes/reader.go
// license that can be found in the LICENSE file. package bytes import ( "errors" "io" "unicode/utf8" ) // A Reader implements the [io.Reader], [io.ReaderAt], [io.WriterTo], [io.Seeker], // [io.ByteScanner], and [io.RuneScanner] interfaces by reading from // a byte slice. // Unlike a [Buffer], a Reader is read-only and supports seeking.
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Tue Jul 16 18:17:37 GMT 2024 - 3.9K bytes - Click Count (0) -
src/bufio/bufio.go
var buf strings.Builder buf.Grow(n) // Copy full pieces and fragment in. for _, fb := range full { buf.Write(fb) } buf.Write(frag) return buf.String(), err } // WriteTo implements io.WriterTo. // This may make multiple calls to the [Reader.Read] method of the underlying [Reader]. // If the underlying reader supports the [Reader.WriteTo] method, // this calls the underlying [Reader.WriteTo] without buffering.
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Fri Feb 06 17:28:40 GMT 2026 - 22K bytes - Click Count (0) -
src/bytes/buffer.go
return b2[:i] } // WriteTo writes data to w until the buffer is drained or an error occurs. // The return value n is the number of bytes written; it always fits into an // int, but it is int64 to match the [io.WriterTo] interface. Any error // encountered during the write is also returned. func (b *Buffer) WriteTo(w io.Writer) (n int64, err error) { b.lastRead = opInvalid if nBytes := b.Len(); nBytes > 0 {
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Fri Nov 14 19:01:17 GMT 2025 - 16.5K bytes - Click Count (0) -
src/bufio/bufio_test.go
t.Fatalf("Buffered = %v; want %v", buffered, wantBuffered) } } func BenchmarkReaderCopyOptimal(b *testing.B) { // Optimal case is where the underlying reader implements io.WriterTo srcBuf := bytes.NewBuffer(make([]byte, 8192)) src := NewReader(srcBuf) dstBuf := new(bytes.Buffer) dst := onlyWriter{dstBuf} for i := 0; i < b.N; i++ { srcBuf.Reset() src.Reset(srcBuf)
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Fri Feb 07 01:08:54 GMT 2025 - 51.6K bytes - Click Count (0)