transfer.sh/vendor/github.com/mattn/go-isatty/_example/example.go

16 lines
205 B
Go
Raw Normal View History

package main
import (
"fmt"
"github.com/mattn/go-isatty"
"os"
)
func main() {
if isatty.IsTerminal(int(os.Stdout.Fd())) {
fmt.Println("Is Terminal")
} else {
fmt.Println("Is Not Terminal")
}
}