Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + const MaxScanTokenSize + var ErrAdvanceTooFar = errors.New("bufio.Scanner: SplitFunc returns advance count beyond input") + var ErrBadReadCount = errors.New("bufio.Scanner: Read returned impossible count") + var ErrBufferFull = errors.New("bufio: buffer full") + var ErrFinalToken = errors.New("final token") + var ErrInvalidUnreadByte = errors.New("bufio: invalid use of UnreadByte") + var ErrInvalidUnreadRune = errors.New("bufio: invalid use of UnreadRune") + var ErrNegativeAdvance = errors.New("bufio.Scanner: SplitFunc returns negative advance count") + var ErrNegativeCount = errors.New("bufio: negative count") + var ErrTooLong = errors.New("bufio.Scanner: token too long") + func ScanBytes(data []byte, atEOF bool) (advance int, token []byte, err error) + func ScanLines(data []byte, atEOF bool) (advance int, token []byte, err error) + func ScanRunes(data []byte, atEOF bool) (advance int, token []byte, err error) + func ScanWords(data []byte, atEOF bool) (advance int, token []byte, err error) + type ReadWriter struct + func NewReadWriter(r *Reader, w *Writer) *ReadWriter + type Reader struct + func NewReader(rd io.Reader) *Reader + func NewReaderSize(rd io.Reader, size int) *Reader + func (b *Reader) Buffered() int + func (b *Reader) Discard(n int) (discarded int, err error) + func (b *Reader) Peek(n int) ([]byte, error) + func (b *Reader) Read(p []byte) (n int, err error) + func (b *Reader) ReadByte() (byte, error) + func (b *Reader) ReadBytes(delim byte) ([]byte, error) + func (b *Reader) ReadLine() (line []byte, isPrefix bool, err error) + func (b *Reader) ReadRune() (r rune, size int, err error) + func (b *Reader) ReadSlice(delim byte) (line []byte, err error) + func (b *Reader) ReadString(delim byte) (string, error) + func (b *Reader) Reset(r io.Reader) + func (b *Reader) Size() int + func (b *Reader) UnreadByte() error + func (b *Reader) UnreadRune() error + func (b *Reader) WriteTo(w io.Writer) (n int64, err error) + type Scanner struct + func NewScanner(r io.Reader) *Scanner + func (s *Scanner) Buffer(buf []byte, max int) + func (s *Scanner) Bytes() []byte + func (s *Scanner) Err() error + func (s *Scanner) Scan() bool + func (s *Scanner) Split(split SplitFunc) + func (s *Scanner) Text() string + type SplitFunc func(data []byte, atEOF bool) (advance int, token []byte, err error) + type Writer struct + func NewWriter(w io.Writer) *Writer + func NewWriterSize(w io.Writer, size int) *Writer + func (b *Writer) Available() int + func (b *Writer) AvailableBuffer() []byte + func (b *Writer) Buffered() int + func (b *Writer) Flush() error + func (b *Writer) ReadFrom(r io.Reader) (n int64, err error) + func (b *Writer) Reset(w io.Writer) + func (b *Writer) Size() int + func (b *Writer) Write(p []byte) (nn int, err error) + func (b *Writer) WriteByte(c byte) error + func (b *Writer) WriteRune(r rune) (size int, err error) + func (b *Writer) WriteString(s string) (int, error)