MCPcopy Create free account
hub / github.com/box-cli-maker/box-cli-maker / main

Function main

examples/custom_box/main.go:9–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7)
8
9func main() {
10 emojiBorderBox := box.NewBox().Padding(2, 3).Color(box.HiRed).TitlePosition(box.Top)
11 emojiBorderBox.TopRight("📦").TopLeft("📦🚀").BottomRight("📦").BottomLeft("📦").Horizontal("📦").Vertical("📦")
12
13 fmt.Println(emojiBorderBox.MustRender("Box CLI Maker", "Render highly customizable boxes\nin the terminal"))
14
15 unequalBorderBox := box.NewBox().Padding(2, 3).Color(box.Green).TitlePosition(box.Bottom).TitleColor("#00ffb2").Color("#8B75FF").ContentColor("#12c78f")
16 unequalBorderBox.TopRight("+").TopLeft("+").BottomRight("+").BottomLeft("++").Horizontal("-").Vertical("||")
17
18 fmt.Println(unequalBorderBox.MustRender("Box CLI Maker", "Render highly customizable boxes\nin the terminal"))
19}

Callers

nothing calls this directly

Calls 12

TitlePositionMethod · 0.80
ColorMethod · 0.80
PaddingMethod · 0.80
VerticalMethod · 0.80
HorizontalMethod · 0.80
BottomLeftMethod · 0.80
BottomRightMethod · 0.80
TopLeftMethod · 0.80
TopRightMethod · 0.80
MustRenderMethod · 0.80
ContentColorMethod · 0.80
TitleColorMethod · 0.80

Tested by

no test coverage detected