internal/debug: support color terminal for cygwin/msys2 (#17740)

- update go-colorable, go-isatty, go-runewidth packages
- use go-isatty instead of log/term and remove log/term package
This commit is contained in:
HackyMiner
2018-09-29 23:15:39 +09:00
committed by Felix Lange
parent d9e324a331
commit 44eb69561a
23 changed files with 326 additions and 296 deletions

View File

@ -14,3 +14,9 @@ func IsTerminal(fd uintptr) bool {
err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
return err == nil
}
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
// terminal. This is also always false on this environment.
func IsCygwinTerminal(fd uintptr) bool {
return false
}