IsStdoutTerminal returns true if stdout is connected to a terminal.
()
| 13 | |
| 14 | // IsStdoutTerminal returns true if stdout is connected to a terminal. |
| 15 | func IsStdoutTerminal() bool { |
| 16 | return term.IsTerminal(int(os.Stdout.Fd())) |
| 17 | } |
| 18 | |
| 19 | // IsStderrTerminal returns true if stderr is connected to a terminal. |
| 20 | func IsStderrTerminal() bool { |
no outgoing calls