1
0
mirror of https://github.com/go-task/task.git synced 2024-12-12 10:45:49 +02:00
task/internal/term/term.go

12 lines
165 B
Go
Raw Normal View History

package term
import (
"os"
"golang.org/x/term"
)
func IsTerminal() bool {
return term.IsTerminal(int(os.Stdin.Fd())) && term.IsTerminal(int(os.Stdout.Fd()))
}