Browse Source

Merge pull request #17 from dolmen-go/move-example-to-godoc

Move example to show in godoc
mattn 8 years ago
parent
commit
fc9e8d8ef4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      example_test.go

+ 2 - 2
_example/example.go → example_test.go

@@ -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()) {