Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StyleDefault renders a List like below: // - Game Of Thrones // --- Winter // - Is // - Coming // --- This // - Is // - Known StyleDefault = Style{ Format: text.FormatDefault, CharConnect: "-", CharItem: "-", CharItemBottom: "-", CharItemFirst: "-", CharItemTop: "-", CharPaddingLeft: "-", CharPaddingRight: "", Name: "StyleDefault", } // StyleBulletCircle renders a List like below: // ● Game Of Thrones // ● Winter // ● Is // ● Coming // ● This // ● Is // ● Known StyleBulletCircle = Style{ Format: text.FormatDefault, CharConnect: " ", CharItem: text.BulletCircle, CharItemBottom: text.BulletCircle, CharItemFirst: text.BulletCircle, CharItemTop: text.BulletCircle, CharPaddingLeft: " ", CharPaddingRight: "", Name: "StyleBulletCircle", } // StyleBulletFlower renders a List like below: // ✽ Game Of Thrones // ✽ Winter // ✽ Is // ✽ Coming // ✽ This // ✽ Is // ✽ Known StyleBulletFlower = Style{ Format: text.FormatDefault, CharConnect: " ", CharItem: text.BulletFlower, CharItemBottom: text.BulletFlower, CharItemFirst: text.BulletFlower, CharItemTop: text.BulletFlower, CharPaddingLeft: " ", CharPaddingRight: "", Name: "StyleBulletFlower", } // StyleBulletSquare renders a List like below: // ■ Game Of Thrones // ■ Winter // ■ Is // ■ Coming // ■ This // ■ Is // ■ Known StyleBulletSquare = Style{ Format: text.FormatDefault, CharConnect: " ", CharItem: text.BulletSquare, CharItemBottom: text.BulletSquare, CharItemFirst: text.BulletSquare, CharItemTop: text.BulletSquare, CharPaddingLeft: " ", CharPaddingRight: "", Name: "StyleBulletSquare", } // StyleBulletStar renders a List like below: // ✭ Game Of Thrones // ✭ Winter // ✭ Is // ✭ Coming // ✭ This // ✭ Is // ✭ Known StyleBulletStar = Style{ Format: text.FormatDefault, CharConnect: " ", CharItem: text.BulletStar, CharItemBottom: text.BulletStar, CharItemFirst: text.BulletStar, CharItemTop: text.BulletStar, CharPaddingLeft: " ", CharPaddingRight: "", Name: "StyleBulletStar", } // StyleBulletTriangle renders a List like below: // ▶ Game Of Thrones // ▶ Winter // ▶ Is // ▶ Coming // ▶ This // ▶ Is // ▶ Known StyleBulletTriangle = Style{ Format: text.FormatDefault, CharConnect: " ", CharItem: text.BulletTrianglePointingRight, CharItemBottom: text.BulletTrianglePointingRight, CharItemFirst: text.BulletTrianglePointingRight, CharItemTop: text.BulletTrianglePointingRight, CharPaddingLeft: " ", CharPaddingRight: "", Name: "StyleBulletTriangle", } // StyleConnectedBold renders a List like below: // ┏━ Game Of Thrones // ┗━┳━ Winter // ┣━ Is // ┣━ Coming // ┗━┳━ This // ┣━ Is // ┗━ Known StyleConnectedBold = Style{ Format: text.FormatDefault, CharConnect: text.BoxBottomLeftBold, CharItem: text.BoxLeftSeparatorBold, CharItemBottom: text.BoxBottomLeftBold, CharItemFirst: text.BoxTopSeparatorBold, CharItemTop: text.BoxTopLeftBold, CharPaddingLeft: text.BoxHorizontalBold, CharPaddingRight: text.BoxHorizontalBold, Name: "StyleConnectedBold", } // StyleConnectedDouble renders a List like below: // ╔═ Game Of Thrones // ╚═╦═ Winter // ╠═ Is // ╠═ Coming // ╚═╦═ This // ╠═ Is // ╚═ Known StyleConnectedDouble = Style{ Format: text.FormatDefault, CharConnect: text.BoxBottomLeftDouble, CharItem: text.BoxLeftSeparatorDouble, CharItemBottom: text.BoxBottomLeftDouble, CharItemFirst: text.BoxTopSeparatorDouble, CharItemTop: text.BoxTopLeftDouble, CharPaddingLeft: text.BoxHorizontalDouble, CharPaddingRight: text.BoxHorizontalDouble, Name: "StyleConnectedDouble", } // StyleConnectedLight renders a List like below: // ┌─ Game Of Thrones // └─┬─ Winter // ├─ Is // ├─ Coming // └─┬─ This // ├─ Is // └─ Known StyleConnectedLight = Style{ Format: text.FormatDefault, CharConnect: text.BoxBottomLeft, CharItem: text.BoxLeftSeparator, CharItemBottom: text.BoxBottomLeft, CharItemFirst: text.BoxTopSeparator, CharItemTop: text.BoxTopLeft, CharPaddingLeft: text.BoxHorizontal, CharPaddingRight: text.BoxHorizontal, Name: "StyleConnectedLight", } // StyleConnectedRounded renders a List like below: // ╭─ Game Of Thrones // ╰─┬─ Winter // ├─ Is // ├─ Coming // ╰─┬─ This // ├─ Is // ╰─ Known StyleConnectedRounded = Style{ Format: text.FormatDefault, CharConnect: text.BoxBottomLeftRounded, CharItem: text.BoxLeftSeparator, CharItemBottom: text.BoxBottomLeftRounded, CharItemFirst: text.BoxTopSeparator, CharItemTop: text.BoxTopLeftRounded, CharPaddingLeft: text.BoxHorizontal, CharPaddingRight: text.BoxHorizontal, Name: "StyleConnectedRounded", } )
Functions ¶
This section is empty.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
List helps print a 2-dimensional array in a human readable pretty-List.
func (*List) AppendItem ¶
func (l *List) AppendItem(item interface{})
AppendItem appends the item to the List of items to render.
func (*List) AppendItems ¶
func (l *List) AppendItems(items []interface{})
AppendItems appends the items to the List of items to render.
func (*List) Indent ¶
func (l *List) Indent()
Indent indents the following items to appear right-shifted.
func (*List) Render ¶
Render renders the List in a human-readable "pretty" format. Example:
┌─ Game Of Thrones └─┬─ Winter ├─ Is ├─ Coming └─┬─ This ├─ Is └─ Known
type Style ¶
type Style struct { Format text.Format CharConnect string CharItem string CharItemBottom string CharItemFirst string CharItemTop string CharPaddingLeft string CharPaddingRight string Name string }
Style declares how to render the List.
Click to show internal directories.
Click to hide internal directories.