fatih / color

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

Fprint and FprintFunc should have same signature #74

Closed akyoto closed 7 years ago

akyoto commented 7 years ago

In order to create a ColoredWriter which implements the io.Writer interface it is useful to have FprintFunc return (int, error) just like Fprint itself.

fatih commented 7 years ago

Hi @blitzprog.

This breaks the function signature and thus the API. It's not something I can merge (I had to change all other function names as well. You can create a struct, wrap the color package and create your own io.Writer. Thanks for the contribution though, much appreciated.

akyoto commented 7 years ago

@fatih Alright, it's not a big deal. In the end I went with the approach you described. Thank you!