Documentation
¶
Overview ¶
Package text provides ANSI text color functions.
Each function wraps the input string with ANSI escape codes for the specified color and automatically appends a reset code.
Example ¶
Example shows basic usage of text color functions.
package main
import (
"fmt"
"github.com/sitnikovik/paints/color/text"
)
func main() {
fmt.Println(text.Red("Error message"))
fmt.Println(text.Green("Success"))
fmt.Println(text.Blue("Information"))
}
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Blue ¶
Blue returns a new string with blue text.
Wraps the provided string with ANSI codes on the left and right.
func Cyan ¶
Cyan returns a new string with cyan text.
Wraps the provided string with ANSI codes on the left and right.
func Green ¶
Green returns a new string with green text.
Wraps the provided string with ANSI codes on the left and right.
func Purple ¶
Purple returns a new string with purple text.
Wraps the provided string with ANSI codes on the left and right.
Types ¶
This section is empty.