Documentation ¶
Index ¶
- func Environ() map[string]string
- func Getenv(name string, def ...string) string
- func HasShellEnv(shell string) bool
- func IsConsole(out io.Writer) bool
- func IsLinux() bool
- func IsMSys() bool
- func IsMac() bool
- func IsSupport256Color() bool
- func IsSupportColor() bool
- func IsSupportTrueColor() bool
- func IsTerminal(fd uintptr) bool
- func IsWSL() bool
- func IsWin() bool
- func IsWindows() bool
- func StdIsTerminal() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSupportColor ¶
func IsSupportColor() bool
IsSupportColor check current console is support color.
Supported:
linux, mac, or windows's ConEmu, Cmder, putty, git-bash.exe
Not support:
windows cmd.exe, powerShell.exe
func IsSupportTrueColor ¶
func IsSupportTrueColor() bool
IsSupportTrueColor render. IsSupportRGBColor
func IsWSL ¶
func IsWSL() bool
IsWSL system env https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.