Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInMessage is returned if the message contained an error string ErrInMessage = errors.New("listparse: Error returned") // ErrFormat is returned if the format is corrupt ErrFormat = errors.New("listparse: Format malformed") // ErrNoEntries is returned if no entries are found in the list ErrNoEntries = errors.New("listparse: No entries in list") // ErrSomeErrors is returned if some entries were corrupts but we were able to read at least some ErrSomeErrors = errors.New("listparse: List contains some errors, recovered") )
Functions ¶
func ReadMessageList ¶
func ReadMessageList(d []byte) (messages []*structs.MessageStruct, lastline []byte, err error)
ReadMessageList reads a message list from reader and outputs a list of MessageStructs Callers must verify that messages is nil or that err!=ErrSomeErrors
func WriteMessageList ¶
func WriteMessageList(messages []*structs.MessageStruct, w io.Writer)
WriteMessageList formats a message list into a list of newline separated lines with space separated values
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.