Files
eiblog/vendor/github.com/mattn/go-isatty/_example/example.go
2017-02-18 15:23:57 +08:00

16 lines
200 B
Go

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