package
Version:
v2.1.3+incompatible
Opens a new window with list of versions in this module.
Published: Jan 27, 2016
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
const (
MaxLength = 65524
)
View Source
var (
ErrUnderflow = errors.New("unexpected string length (underflow)")
ErrInvalidLen = errors.New("invalid length")
)
View Source
var (
ErrOverflow = errors.New("unexpected string length (overflow)")
)
Encode encodes a byte slice to pkt-line format
EncodeFromString encodes a string to pkt-line format
Decoder implements a pkt-line format decoder
NewDecoder returns a new Decoder
ReadAll read and returns all the lines
ReadBlock reads and return multiple pkt-line lines, it stops at the end
of the reader or if a flush-pkt is reached
ReadLine reads and return one pkt-line line from the reader
Encoder implements a pkt-line format encoder
NewEncoder returns a new Encoder
AddFlush adds a flush-pkt to the encoder
AddLine encode and adds a line to the encoder
Reader returns a string.Reader over the encoder
Source Files
¶
Click to show internal directories.
Click to hide internal directories.