• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.travis.ymlH A D25-Sep-2017204

LICENSEH A D25-Sep-20171.1 KiB

README.mdH A D25-Sep-20171.1 KiB

doc.goH A D25-Sep-201764

example_test.goH A D25-Sep-2017306

isatty_appengine.goH A D25-Sep-2017422

isatty_bsd.goH A D25-Sep-2017425

isatty_linux.goH A D25-Sep-2017405

isatty_linux_ppc64x.goH A D25-Sep-2017415

isatty_others.goH A D25-Sep-2017252

isatty_others_test.goH A D25-Sep-2017273

isatty_solaris.goH A D25-Sep-2017402

isatty_windows.goH A D25-Sep-20172.1 KiB

isatty_windows_test.goH A D25-Sep-2017831

README.md

1# go-isatty
2
3[![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty)
4[![Build Status](https://travis-ci.org/mattn/go-isatty.svg?branch=master)](https://travis-ci.org/mattn/go-isatty)
5[![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master)
6[![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty)
7
8isatty for golang
9
10## Usage
11
12```go
13package main
14
15import (
16	"fmt"
17	"github.com/mattn/go-isatty"
18	"os"
19)
20
21func main() {
22	if isatty.IsTerminal(os.Stdout.Fd()) {
23		fmt.Println("Is Terminal")
24	} else if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
25		fmt.Println("Is Cygwin/MSYS2 Terminal")
26	} else {
27		fmt.Println("Is Not Terminal")
28	}
29}
30```
31
32## Installation
33
34```
35$ go get github.com/mattn/go-isatty
36```
37
38## License
39
40MIT
41
42## Author
43
44Yasuhiro Matsumoto (a.k.a mattn)
45
46## Thanks
47
48* k-takata: base idea for IsCygwinTerminal
49
50    https://github.com/k-takata/go-iscygpty
51