()
| 23 | ) |
| 24 | |
| 25 | func main() { |
| 26 | b := box.NewBox(). |
| 27 | Style(box.Round). |
| 28 | Padding(2, 2). |
| 29 | TitlePosition(box.Top). |
| 30 | ContentAlign(box.Left). |
| 31 | Color(colorBorderPrimary). |
| 32 | TitleColor(colorTitlePrimary) |
| 33 | |
| 34 | lines := []string{ |
| 35 | "• " + accent("9 styles", colorBorderSoft) + " (Single, Double, Round, Bold, etc.)", |
| 36 | "• " + accent("Typed API", colorTitlePrimary) + " BoxStyle / TitlePosition / AlignType", |
| 37 | "• " + accent("Custom styles", colorBorderDeep) + " Corner/edge glyphs + Copy()", |
| 38 | "• " + accent("Titles", colorContentPrimary) + " Inside • Top • Bottom", |
| 39 | "• " + accent("Align", colorContentPrimary) + " Left • Center • Right", |
| 40 | "• " + accent("Wrapping", colorBorderSoft) + " WrapContent + WrapLimit", |
| 41 | "• " + accent("Colors", colorContentSoft) + " ANSI names, hex, rgb/rgba", |
| 42 | "• " + accent("Unicode & emoji", colorContentPrimary) + " мир", |
| 43 | "• " + accent("Render / MustRender", colorBorderDeep) + " explicit error handling", |
| 44 | } |
| 45 | |
| 46 | content := strings.Join(lines, "\n") |
| 47 | fmt.Println(b.MustRender("Box CLI Maker", content)) |
| 48 | } |
| 49 | |
| 50 | func accent(text, hex string) string { |
| 51 | c := ansi.XParseColor(hex) |
nothing calls this directly
no test coverage detected