설명 없음

mattn fc9e8d8ef4 Merge pull request #17 from dolmen-go/move-example-to-godoc 8 년 전
.travis.yml 018779d6e8 remove sudo 8 년 전
LICENSE f60d253179 Added license file. 10 년 전
README.md 9622e0cc9d fix badges 8 년 전
doc.go d8798807d8 godoc 11 년 전
example_test.go b6ee8e8f7b Move example to godoc 8 년 전
isatty_appengine.go 2c84d1a242 Add isCygwinTerminal to non-appengine environments 8 년 전
isatty_bsd.go 089e34f010 Add dragonfly to bsd build 9 년 전
isatty_linux.go ca19903305 Support for AppEngine classic 10 년 전
isatty_others.go 2c84d1a242 Add isCygwinTerminal to non-appengine environments 8 년 전
isatty_others_test.go 50daa11e01 add test 8 년 전
isatty_solaris.go ca19903305 Support for AppEngine classic 10 년 전
isatty_windows.go 928cf5943f fixes for review 9 년 전
isatty_windows_test.go 05d3780075 add build costraint 9 년 전

README.md

go-isatty

Godoc Reference Build Status Coverage Status Go Report Card

isatty for golang

Usage

package main

import (
	"fmt"
	"github.com/mattn/go-isatty"
	"os"
)

func main() {
	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")
	}
}

Installation

$ go get github.com/mattn/go-isatty

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)

Thanks