Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrProfileNotFound = errors.New("profile not found")
)
Functions ¶
This section is empty.
Types ¶
type Marker ¶
Marker are used to provide alignment hints in rulers.
e.g.: | --: | for right alignment
The same alignment, however, may have different representations, depending on the currently active profile.
e.g.: center alignment
psv: -:- markdown: :-:
TODO 2026-02-26 Placement is not currently used to identify floating markers
- see render/ruler.go
type Placement ¶
type Placement byte
const ( PlaceCenter Placement = 0x0 // 0000 - center alignment PlaceRight Placement = 0x1 // 0001 - right alignment (bound to right edge) PlaceFloatRight Placement = 0x2 // 0010 - number alignment (dynamic right-leaning position) PlaceFloatLeft Placement = 0x4 // 0100 - version alignment (dynamic, left-leaning position) PlaceLeft Placement = 0x8 // 1000 - left alignment (bound to right edge) PlaceOuter Placement = 0x9 // 1001 - center alignment (bound to left & right edges) )
type Profile ¶
type Profile struct {
Name string // the name of this profile
Aliases []string // alternative name(s) for this profile
FlagsMask column.Flags // supported flags by this profile (default: none)
Replace map[column.Flags]column.Flags // mapping of unsupported to supported alignment hints
MinFill int // minimum horizontal line length required per ruler field
RulerRows []int // where to place rulers during export (default: use table's structure)
HeaderRow bool // true: first row is never sorted, false: no special treatment for first row
CollapseEmpty bool // if true, empty columns will be shown as ||, otherwise, the MinFill length + padding
// alignment markers and their positions
Left Marker
Center Marker
Right Marker
Number Marker
Version Marker
}
TODO: 2026-03-06 use same Names []string pattern as keyword.Keyword
func (*Profile) Flags ¶
Flags masks and maps a set of column flags to the set of flags that are supported by this profile
Click to show internal directories.
Click to hide internal directories.