Documentation
¶
Overview ¶
Package colour implements basic text colouring for cli's limited needs.
In particular, it's not expected to provide every ANSI code, just the ones we need. The codes have also been padded so that they are the same length, which means text/tabwriter will correctly calculate alignment as long as styles are not mixed within a table.
Index ¶
Constants ¶
View Source
const ( CodeReset = "\x1b[000000m" // Reset all attributes CodeTitle = "\x1b[1;39;4m" // Bold, white & underlined CodeBold = "\x1b[1;0039m" // Bold & white )
ANSI codes for coloured output, they are all the same length so as not to throw off alignment of text/tabwriter.
Variables ¶
View Source
var Disable atomic.Bool
Disable is a flag that disables all colour text, it overrides both $FORCE_COLOR and $NO_COLOR, setting it to true will always make this package return plain text and not check any other config.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.