mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 19:19:57 +00:00
TUN-528: Move cloudflared into a separate repo
This commit is contained in:
18
vendor/github.com/mattn/go-isatty/example_test.go
generated
vendored
Normal file
18
vendor/github.com/mattn/go-isatty/example_test.go
generated
vendored
Normal file
@@ -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")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user