Documentation ¶
Overview ¶
Package rgblog provides functions to color standard output using ANSI escape codes. See, https://en.wikipedia.org/wiki/ANSI_escape_code#Colors, for more detail on ANSI codes.
Here's an example:
import( rgb "github.com/foresthoffman/rgblog" ) func main() { rgb.YPrintf("Hello, %s!\n", "World") // the format gets wrapped with "\033[0;33m" // and "\033[0m", before being sent to // standard output via fmt.Printf() }
Index ¶
- func BkPrintf(f string, a ...interface{})
- func BlPrintf(f string, a ...interface{})
- func CPrintf(f string, a ...interface{})
- func GPrintf(f string, a ...interface{})
- func MPrintf(f string, a ...interface{})
- func RPrintf(f string, a ...interface{})
- func WPrintf(f string, a ...interface{})
- func YPrintf(f string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BkPrintf ¶
func BkPrintf(f string, a ...interface{})
Formats the output according to the format string and uses the provided interface data to fill it in. The output is wrapped with ANSI color escape codes, which can be used to make standard output more readable, in supporting shells.
Output color: black
func BlPrintf ¶
func BlPrintf(f string, a ...interface{})
Formats the output according to the format string and uses the provided interface data to fill it in. The output is wrapped with ANSI color escape codes, which can be used to make standard output more readable, in supporting shells.
Output color: blue
func CPrintf ¶
func CPrintf(f string, a ...interface{})
Formats the output according to the format string and uses the provided interface data to fill it in. The output is wrapped with ANSI color escape codes, which can be used to make standard output more readable, in supporting shells.
Output color: cyan
func GPrintf ¶
func GPrintf(f string, a ...interface{})
Formats the output according to the format string and uses the provided interface data to fill it in. The output is wrapped with ANSI color escape codes, which can be used to make standard output more readable, in supporting shells.
Output color: green
func MPrintf ¶
func MPrintf(f string, a ...interface{})
Formats the output according to the format string and uses the provided interface data to fill it in. The output is wrapped with ANSI color escape codes, which can be used to make standard output more readable, in supporting shells.
Output color: magenta
func RPrintf ¶
func RPrintf(f string, a ...interface{})
Formats the output according to the format string and uses the provided interface data to fill it in. The output is wrapped with ANSI color escape codes, which can be used to make standard output more readable, in supporting shells.
Output color: red
func WPrintf ¶
func WPrintf(f string, a ...interface{})
Formats the output according to the format string and uses the provided interface data to fill it in. The output is wrapped with ANSI color escape codes, which can be used to make standard output more readable, in supporting shells.
Output color: white
func YPrintf ¶
func YPrintf(f string, a ...interface{})
Formats the output according to the format string and uses the provided interface data to fill it in. The output is wrapped with ANSI color escape codes, which can be used to make standard output more readable, in supporting shells.
Output color: yellow
Types ¶
This section is empty.