davecheney / httpstat

It's like curl -v, with colours.
MIT License
6.96k stars 382 forks source link

Windows Color #65

Closed mattn closed 7 years ago

mattn commented 7 years ago

Fixes #64

davecheney commented 7 years ago

Could you do, os.Stdout = color.Output, then we don't need to wrap Printf everywhere.

On 26 Sep. 2016, at 10:58, mattn notifications@github.com wrote:

Seems still bad

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

mattn commented 7 years ago

fatih/color#Output is writer given from mattn/go-colorable#NewColorableStdout().

it's return it self if the os.Stdout is not terminal.

https://github.com/mattn/go-colorable/blob/master/colorable_windows.go#L78-L91

Still you want? I'm okay to change.

davecheney commented 7 years ago

Let's get it working with a wrapper first then we can optimise it

On 26 Sep. 2016, at 11:08, mattn notifications@github.com wrote:

fatih/color#Output is writer given from mattn/go-colorable#NewColorableStdout().

it's return it self if the os.Stdout is not terminal.

https://github.com/mattn/go-colorable/blob/master/colorable_windows.go#L78-L91

Still you want? I'm okay to change.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

davecheney commented 7 years ago

Thank you!