fatih / color

Color package for Go (golang)
https://pkg.go.dev/github.com/fatih/color
MIT License
7.24k stars 615 forks source link

API to convert text to ascii color but not print #110

Closed ORESoftware closed 4 years ago

ORESoftware commented 4 years ago

I didn't expect this to print the text:

color.Cyan("Prints text in cyan.")

instead I am looking for an API that does this:

log.Println(color.Cyan("text in cyan"))

where can I find this API?

MarvinJWendt commented 4 years ago

I think this is what you want: https://github.com/fatih/color#insert-into-noncolor-strings-sprintfunc

ORESoftware commented 4 years ago

thanks yeah this worked for me: https://github.com/logrusorgru/aurora