Documentation ¶
Overview ¶
Package codebuffer is a package that provides a method to read trough a reader and separate the contents into code and text parts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeBuffer ¶
type CodeBuffer struct {
// contains filtered or unexported fields
}
CodeBuffer is a construct to walk over a text separating code from text blocks.
func New ¶
func New(r io.Reader, startTokens, endTokens []rune) *CodeBuffer
New creates a new CodeBuffer with the specified reader.
func (*CodeBuffer) Iterator ¶
func (c *CodeBuffer) Iterator() (Iterator, error)
Iterator returns an iterator that can be used to walk trough the CodeBuffer.
type InReadingState ¶
type InReadingState struct{}
InReadingState is a error that will be returned when the CodeBuffer is busy on another thread.
func (InReadingState) Error ¶
func (InReadingState) Error() string
Error returns the error text for InReadingState.
Click to show internal directories.
Click to hide internal directories.