1
0
mirror of https://github.com/fatih/color.git synced 2024-11-24 08:02:14 +02:00

Minor fix for doc helper functions in README

This commit is contained in:
Andrey Rubtsov 2016-10-02 10:06:52 +03:00
parent 0016e26890
commit bb78242176

View File

@ -81,8 +81,8 @@ info := color.New(color.FgWhite, color.BgGreen).SprintFunc()
fmt.Printf("This %s rocks!\n", info("package"))
// Use helper functions
fmt.Printf("This", color.RedString("warning"), "should be not neglected.")
fmt.Printf(color.GreenString("Info:"), "an important message." )
fmt.Println("This", color.RedString("warning"), "should be not neglected.")
fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.")
// Windows supported too! Just don't forget to change the output to color.Output
fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS"))