It won’t. It’s a feature of Linux (and possibly Mac, I’m not sure), but not windows. Windows do have ways to do colors, but it’s a simpler system than on Linux.
Windows why is much more complex than linux’ as windows needs some function calls that sideway the character stream. Including explicit flushes every couple of bytes to make sure the new colour will be applied from the right characters.
Though as far as I know, modern windows terminals (somewhen introduced in win10) are capable of understanding ANSI codes for colouring.
Perhaps it’s also Powershell only? Nor exactly sure…
There might be libraries which wrap the system in a way that you can just use their API.
Though I never have used on in go so far.
Last time was for ruby, and it didn’t work well. The API was not as clumsy as the windows one, but not as straight forward as the Linux one. And it flushes the stream after every character… It was not a nice experience…
Usually it’s the easiest to just not use color when on windows.