Documentation
¶
Index ¶
- func Footer()
- func FooterC(name string)
- func FullTitle(title string)
- func Header(text string)
- func KeyValue(key string, value string, indentation int)
- func ListItemO(text string, indentation int, number int)
- func ListItemU(text string, indentation int)
- func ListO(list []string, indentation int)
- func ListU(list []string, indentation int)
- func Message(title string, message string, color string)
- func NewLines(count int)
- func Quote(text string)
- func Ruler(c string)
- func SubTitle(title string)
- func Table(headings []string, data [][]string)
- func Text(text string)
- func Title(title string)
- func TitleC(title string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Footer ¶
func Footer()
Footer prints a simple dashed line. It can be used at the end of your output to separate it from the following one.
func FooterC ¶
func FooterC(name string)
FooterC does alsmost the same as the Footer() function, but adds a copyright notice with the provided name and the current year in the center of the dashed line.
func FullTitle ¶
func FullTitle(title string)
FullTitle prints out a title that is as wide as your terminal is.
func Header ¶
func Header(text string)
Header prints out a provided text as a centered message, which can be used to display program names. An example would be to display the program name, along with the current version as shown below
tcl.Header("My Program @ v0.1.0")
func KeyValue ¶
KeyValue lets you provide a 'key' and a 'value' as strings, which then will be printed as a pair to the console. Because the key-value pair is presetnted as a unordered list item, you can specify a indentation via the 'indentation' parameter.
func ListItemO ¶
ListItemO takes a string and displays it as a ordered list item. With the indentation parameter you can specify if and how deep you want to indent the entry, which might be useful is you want to nest entries. With the number parameter, you can specify the number that is displayed before the entry.
func ListItemU ¶
ListItemU takes a string and displays it as a unordered list item. With the indentation parameter you can specify if and how deep you want to indent the entry, which might be useful is you want to nest entries.
func Message ¶
Message let's you print a title along with a message to the console. With the color parameter, you can specify the background color of the title. This is useful if you want to underline a result of a action that was taken, for example a green message after a successful action. The possible and allowed colors are:
- black
- blue
- cyan
- green
- magenta
- red
- white
- yellow
If you don't specify a valid color, a white message will be printed.
func NewLines ¶
func NewLines(count int)
newLines does print any number of newlines provided as a parameter.
func Ruler ¶
func Ruler(c string)
Ruler lets you print a horizontal ruler to the console consisting of the provided caracter(s).
Types ¶
This section is empty.