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

Function main

examples/box_styles/main.go:22–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22func main() {
23 styles := []box.BoxStyle{
24 box.Single,
25 box.SingleDouble,
26 box.Double,
27 box.DoubleSingle,
28 box.Bold,
29 box.Round,
30 box.Hidden,
31 box.Classic,
32 box.Block,
33 }
34
35 for _, style := range styles {
36 b := box.NewBox().
37 Padding(4, 3).
38 Style(style).
39 TitleColor("#00ffb2").
40 Color("#8B75FF").
41 ContentColor("#12c78f").
42 ContentAlign(box.Center)
43
44 out, err := b.Render("Box CLI Maker",
45 "Render highly customizable boxes\nin the terminal")
46 if err != nil {
47 panic(err)
48 }
49
50 fmt.Printf("\n%s", indentBox(out, 4))
51 }
52}

Callers

nothing calls this directly

Calls 8

indentBoxFunction · 0.85
ContentAlignMethod · 0.80
ContentColorMethod · 0.80
ColorMethod · 0.80
TitleColorMethod · 0.80
StyleMethod · 0.80
PaddingMethod · 0.80
RenderMethod · 0.80

Tested by

no test coverage detected