Color是用Go语言编写的ANSIEscapeCodes术语,你可以自定义屏幕的输出颜色。
标准颜色:
// Print with default helper functionscolor.Cyan("Prints text in cyan.")// A newline will be appended automaticallycolor.Blue("Prints %s in blue.", "text")// These are using the default foreground colorscolor.Red("We have red")color.Magenta("And many others ..")
评论