scanner

package
v0.0.0-...-393bab8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scanner

type Scanner struct {
	Pos int64 // position in reader
	End int64
	// contains filtered or unexported fields
}

func New

func New(r io.Reader) *Scanner

func (*Scanner) Back

func (s *Scanner) Back()

back undoes a previous call to next(), moving backward one byte in the internal buffer. as we only guarantee a lookback buffer size of one, any subsequent calls to back() before calling next() may panic

func (*Scanner) Cur

func (s *Scanner) Cur() byte

read byte at current position (without advancing)

func (*Scanner) Next

func (s *Scanner) Next() byte

read next byte

func (*Scanner) Remaining

func (s *Scanner) Remaining() int64

remaining returns the number of unread bytes if EOF for the underlying reader has not yet been found, maximum possible integer value will be returned

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL