- Sort Score
- Result 10 results
- Languages All
Results 141 - 144 of 144 for these (0.01 sec)
-
src/bytes/buffer_test.go
want = strconv.AppendInt(want, int64(i), 10) got.Write(b) } if !Equal(got.Bytes(), want) { t.Fatalf("Bytes() = %q, want %q", &got, want) } // With a sufficiently sized buffer, there should be no allocations. n := testing.AllocsPerRun(100, func() { got.Reset() for i := 0; i < 1000; i++ { b := got.AvailableBuffer() b = strconv.AppendInt(b, int64(i), 10) got.Write(b) } })
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon May 19 16:13:04 UTC 2025 - 18.6K bytes - Viewed (0) -
src/bufio/bufio_test.go
} if b != data[i] { t.Fatalf("n = %d: incorrect byte returned from ReadByte: got %q, want %q", n, b, data[i]) } } // Unread one byte if there is one. if n > 0 { if err := r.UnreadByte(); err != nil { t.Errorf("n = %d: unexpected error on UnreadByte: %v", n, err) } } // Test that we cannot unread any further.
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Fri Feb 07 01:08:54 UTC 2025 - 51.6K bytes - Viewed (0) -
src/bufio/bufio.go
n := copy(b.buf[b.n:], s) b.n += n nn += n return nn, nil } // ReadFrom implements [io.ReaderFrom]. If the underlying writer // supports the ReadFrom method, this calls the underlying ReadFrom. // If there is buffered data and an underlying ReadFrom, this fills // the buffer and writes it before calling ReadFrom. func (b *Writer) ReadFrom(r io.Reader) (n int64, err error) { if b.err != nil { return 0, b.err }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Sep 03 14:04:47 UTC 2025 - 22K bytes - Viewed (0) -
src/archive/tar/reader_test.go
PAXRecords: map[string]string{ "linkpath": "PAX4/PAX4/long-linkpath-name", }, Format: FormatPAX, }}, }, { // Both BSD and GNU tar truncate long names at first NUL even // if there is data following that NUL character. // This is reasonable as GNU long names are C-strings. file: "testdata/gnu-long-nul.tar", headers: []*Header{{ Name: "0123456789", Mode: 0644,
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Thu Oct 03 15:48:09 UTC 2024 - 46.9K bytes - Viewed (0)