Documentation ¶
Overview ¶
Package text formats strings for printing in a terminal using ansi codes
Index ¶
- func Black(s string) string
- func Blue(s string) string
- func Cyan(s string) string
- func Green(s string) string
- func Magenta(s string) string
- func PrettyPrint(data interface{}) string
- func Print(description string, values ...interface{})
- func Red(s string) string
- func Sprint(description string, values ...interface{}) (fmtd string)
- func White(s string) string
- func Yellow(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrettyPrint ¶
func PrettyPrint(data interface{}) string
PrettyPrint will return an indented string of an object.
e.g.
[ { "Components": { "Glucose (g/L)": "150 g/l" }, "Volume": "351 ul" }, { "Components": { "Magnesium Sulphate (mM)": "50 mM/l" }, "Volume": "210 ul" },
]
func Print ¶
func Print(description string, values ...interface{})
Print prints to standard out a string description highlighted in red followed by a values in unformatted text
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.