Closed jsiciliano closed 5 years ago
Check out this section of the readme. https://github.com/fatih/color/blob/master/README.md#insert-into-noncolor-strings-sprintfunc
It seems this fails on Win10. I'm building on Mac with [build] constraints to compile for Windows/Linux/Darwin. With the followings
Main_win.go
yellow = color.New(color.FgYellow).SprintFunc()
Main.go
var yellow func(a ...interface{}) string
fmt.Printf(" %s \n", yellow("test"))
Stdout > [33mtest[0m
Hi,
Unfortunately, I'm archiving this project and will no longer maintaining it. For more information, please read my blog post: Taking an indefinite sabbatical from my projects.
Thanks for the feedback and contribution.
It looks like the source code uses fmt.Println for everything, but what if I want things to be on the same line just in a different print statement. For example, if I wanted to use two colors on the same line.
How would I do this? Or do I have to edit the source file?
Thanks!