mirror of
https://github.com/go-task/task.git
synced 2024-12-12 10:45:49 +02:00
12 lines
165 B
Go
12 lines
165 B
Go
|
package term
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
|
||
|
"golang.org/x/term"
|
||
|
)
|
||
|
|
||
|
func IsTerminal() bool {
|
||
|
return term.IsTerminal(int(os.Stdin.Fd())) && term.IsTerminal(int(os.Stdout.Fd()))
|
||
|
}
|