diff options
| author | Paul Buetow <paul@buetow.org> | 2021-09-05 16:04:45 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-09-05 16:04:45 +0300 |
| commit | c895b3c8293ddbf46d66278061d7e0127adc57f7 (patch) | |
| tree | 172df2d8ff40dc04e04eb62637eae6bd8135bed6 /internal | |
| parent | 64429c63054106e39d1a28c488d76db534ff2ed5 (diff) | |
-colorTable in combination with -debug prints whole sample paragraphs in
all color combinations.
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/color/table.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/color/table.go b/internal/color/table.go index e2265e3..7ecfbca 100644 --- a/internal/color/table.go +++ b/internal/color/table.go @@ -5,17 +5,19 @@ import ( "os" ) -func TablePrintAndExit() { +const sampleParagraph string = "Mimecast is Making Email Safer for Business. We believe that securely operating a business in the cloud requires new levels of IT preparedness, centered around cyber resilience. This is why we unify the delivery and management of security, continuity and data protection for email via one, simple-to-use cloud platform. Thousands of organizations trust us to increase their cyber resilience preparedness, streamline compliance, reduce IT complexity and keep their business running. We give employees fast and secure access to sensitive business information, and ensure email keeps flowing in the event of an outage. Mimecast will remain committed to protecting your IT assets through constant innovation and focus on your success." + +func TablePrintAndExit(useSampleParagraph bool) { for _, attr := range AttributeNames { if attr == "Hidden" || attr == "SlowBlink" { continue } - printColorTable(attr) + printColorTable(attr, useSampleParagraph) } os.Exit(0) } -func printColorTable(attr string) { +func printColorTable(attr string, useSampleParagraph bool) { for _, fg := range ColorNames { fgColor, _ := ToFgColor(fg) for _, bg := range ColorNames { @@ -27,6 +29,11 @@ func printColorTable(attr string) { text := fmt.Sprintf(" Foreground:%10s | Background:%10s | Attribute:%10s ", fg, bg, attr) fmt.Print(PaintStrWithAttr(text, fgColor, bgColor, attribute)) + if useSampleParagraph { + fmt.Print("\n") + fmt.Print(PaintStrWithAttr(sampleParagraph, fgColor, bgColor, attribute)) + fmt.Print("\n") + } fmt.Print("\n") } } |
