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

..03-May-2022-

go-isatty-0.0.13/H26-May-2021-

.travis.ymlH A D09-Jun-2021174

LICENSEH A D09-Jun-20211.1 KiB

README.mdH A D09-Jun-20211.1 KiB

doc.goH A D09-Jun-202164

go.modH A D09-Jun-2021104

go.sumH A D09-Jun-2021207

go.test.shH A D09-Jun-2021273

isatty_bsd.goH A D09-Jun-2021488

isatty_others.goH A D09-Jun-2021439

isatty_plan9.goH A D09-Jun-2021492

isatty_solaris.goH A D09-Jun-2021559

isatty_tcgets.goH A D09-Jun-2021460

isatty_windows.goH A D09-Jun-20213.3 KiB

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[![Codecov](https://codecov.io/gh/mattn/go-isatty/branch/master/graph/badge.svg)](https://codecov.io/gh/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