Browse Source

add example

Yasuhiro Matsumoto 10 năm trước cách đây
mục cha
commit
3f7a6730f5
1 tập tin đã thay đổi với 15 bổ sung0 xóa
  1. 15 0
      _example/example.go

+ 15 - 0
_example/example.go

@@ -0,0 +1,15 @@
+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")
+	}
+}