diff options
Diffstat (limited to 'dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/example_test.go')
-rw-r--r-- | dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/example_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/example_test.go b/dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/example_test.go new file mode 100644 index 0000000..fa8f7e7 --- /dev/null +++ b/dependencies/pkg/mod/github.com/mattn/go-isatty@v0.0.16/example_test.go @@ -0,0 +1,18 @@ +package isatty_test + +import ( + "fmt" + "os" + + "github.com/mattn/go-isatty" +) + +func Example() { + if isatty.IsTerminal(os.Stdout.Fd()) { + fmt.Println("Is Terminal") + } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { + fmt.Println("Is Cygwin/MSYS2 Terminal") + } else { + fmt.Println("Is Not Terminal") + } +} |