|
@@ -1,4 +1,4 @@
|
|
|
-package main
|
|
|
|
|
|
|
+package isatty_test
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
"fmt"
|
|
"fmt"
|
|
@@ -7,7 +7,7 @@ import (
|
|
|
"github.com/mattn/go-isatty"
|
|
"github.com/mattn/go-isatty"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
-func main() {
|
|
|
|
|
|
|
+func Example() {
|
|
|
if isatty.IsTerminal(os.Stdout.Fd()) {
|
|
if isatty.IsTerminal(os.Stdout.Fd()) {
|
|
|
fmt.Println("Is Terminal")
|
|
fmt.Println("Is Terminal")
|
|
|
} else if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
|
|
} else if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
|