1
0
mirror of https://github.com/go-task/task.git synced 2024-12-04 10:24:45 +02:00
task/internal/term/term.go
2023-06-03 22:33:22 -03:00

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()))
}