The current implementation of IsTerminal for Windows does only detect when a Go program is running in cmd.exe but not when it is running in MSYS2 (that includes Git bash for Windows).
Adding support for such a terminal detection can easily be done (see this C implementation) and I am willing to do a PR for this if desired.
The change would be 100%-backward compatible and self-contained.
What do you think ?