Documentation
¶
Overview ¶
Package controller ports bat's controller module: it drives the whole pipeline for each input — open and buffer it, detect the syntax (honoring language overrides, syntax mappings and ignored suffixes), highlight it, gather git changes, then walk the lines emitting headers, snip separators, highlighted content and footers through the printer. It also implements the undecorated "cat" path and binary-content handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentType ¶
type ContentType int
ContentType classifies buffered input, mirroring bat's content_inspector.
const ( ContentEmpty ContentType = iota ContentBinary ContentUTF8 ContentUTF16LE ContentUTF16BE )
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller renders a set of inputs according to a Config.
Click to show internal directories.
Click to hide internal directories.