Merge pull request #17 from dolmen-go/move-example-to-godoc
Move example to show in godoc
diff --git a/_example/example.go b/example_test.go
similarity index 87%
rename from _example/example.go
rename to example_test.go
index 5018f97..fa8f7e7 100644
--- a/_example/example.go
+++ b/example_test.go
@@ -1,4 +1,4 @@
-package main
+package isatty_test
import (
"fmt"
@@ -7,7 +7,7 @@
"github.com/mattn/go-isatty"
)
-func main() {
+func Example() {
if isatty.IsTerminal(os.Stdout.Fd()) {
fmt.Println("Is Terminal")
} else if isatty.IsCygwinTerminal(os.Stdout.Fd()) {