Documentation
¶
Overview ¶
Package kcalign provides key code alignment formatter
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter struct {
// Desc is description of this formatter.
Desc string `json:"desc,omitempty"`
// Width is width of a column. Quote characters are included in count.
// Valid minimal is 3, default/fall back is 10.
Width int `json:"width"`
// Span is number of white spaces between columns. Minimal is 0.
Span int `json:"span,omitempty"`
// Quote is quote type for each data.
Quote QuoteType `json:"quote,omitempty"`
// Align is default alignment.
Align RowAlign `json:"align"`
// ExAligns is exceptional alignments per rows.
ExAligns map[int]RowAlign `json:"ex_aligns,omitempty"`
}
Formatter provides format strign array, with alignment like key board.
type QuoteType ¶
type QuoteType int
QuoteType specifies runes to quote each items.
func (QuoteType) MarshalJSON ¶
MarshalJSON provides json.Marshaler.
func (*QuoteType) UnmarshalJSON ¶
UnmarshalJSON provides json.Unmarshaler.
type RowAlign ¶
type RowAlign struct {
// Number of columns.
Num int `json:"num"`
// Indent is left indent.
Indent int `json:"indent,omitempty"`
// TextAlign is default alignment of coloumn.
TextAlign TextAlign `json:"text_align,omitempty"`
// ExMargins extends merge between columns.
ExMargins map[int]int `json:"ex_margins,omitempty"`
// ExWidths extends column width by position.
ExWidths map[int]int `json:"ex_widths,omitempty"`
// ExTextAligns extedns text alignment of columns.
ExTextAligns map[int]TextAlign `json:"ex_text_aligns,omitempty"`
}
RowAlign defines alignment property for each rows.
type TextAlign ¶
type TextAlign int
TextAlign specifies text alignment in column.
func (TextAlign) MarshalJSON ¶
MarshalJSON provides json.Marshaler.
func (*TextAlign) UnmarshalJSON ¶
UnmarshalJSON provides json.Unmarshaler.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gen_testdata_crkbd
command
|
|
|
keymapfmt
command
|
|
|
marshal_crkdb_formatter_json
command
|
|
|
internal
|
|
|
qmkjson
Package qmkjson provides structs for QMK JSON.
|
Package qmkjson provides structs for QMK JSON. |
Click to show internal directories.
Click to hide internal directories.