- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ReadSlice (0.32 sec)
-
src/bufio/bufio.go
func (b *Reader) Buffered() int { return b.w - b.r } // ReadSlice reads until the first occurrence of delim in the input, // returning a slice pointing at the bytes in the buffer. // The bytes stop being valid at the next read. // If ReadSlice encounters an error before finding a delimiter, // it returns all the data in the buffer and the error itself (often io.EOF). // ReadSlice fails with error [ErrBufferFull] if the buffer fills without a delim.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
src/bytes/buffer.go
func (b *Buffer) ReadBytes(delim byte) (line []byte, err error) { slice, err := b.readSlice(delim) // return a copy of slice. The buffer's backing array may // be overwritten by later calls. line = append(line, slice...) return line, err } // readSlice is like ReadBytes but returns a reference to internal buffer data. func (b *Buffer) readSlice(delim byte) (line []byte, err error) { i := IndexByte(b.buf[b.off:], delim)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
src/bufio/bufio_test.go
} // Test error after ReadSlice. _, _, err = r.ReadRune() // reset state if err != nil { t.Error("unexpected error on ReadRune (4):", err) } _, err = r.ReadSlice(0) if err != io.EOF { t.Error("unexpected error on ReadSlice (4):", err) } if r.UnreadRune() == nil { t.Error("expected error after ReadSlice (4)") } } func TestUnreadRuneAtEOF(t *testing.T) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
cmd/streaming-signature-v4.go
// The returned bytes are owned by the bufio.Reader // so they are only valid until the next bufio read. func readChunkLine(b *bufio.Reader) ([]byte, []byte, error) { buf, err := b.ReadSlice('\n') if err != nil { // We always know when EOF is coming. // If the caller asked for a line, there should be a line. if err == io.EOF { err = io.ErrUnexpectedEOF } else if err == bufio.ErrBufferFull {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 16 23:13:47 UTC 2024 - 18.2K bytes - Viewed (0) -
api/go1.txt
pkg bufio, method (*Reader) ReadBytes(uint8) ([]uint8, error) pkg bufio, method (*Reader) ReadLine() ([]uint8, bool, error) pkg bufio, method (*Reader) ReadRune() (int32, int, error) pkg bufio, method (*Reader) ReadSlice(uint8) ([]uint8, error) pkg bufio, method (*Reader) ReadString(uint8) (string, error) pkg bufio, method (*Reader) UnreadByte() error pkg bufio, method (*Reader) UnreadRune() error pkg bufio, method (*Writer) Available() int
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)