Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattn/go-isatty
https://github.com/mattn/go-isatty
cygwin go golang isatty msys2 website
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mattn/go-isatty
- Owner: mattn
- License: mit
- Created: 2014-04-01T01:53:09.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-08-03T07:07:53.000Z (5 months ago)
- Last Synced: 2024-10-29T14:04:50.327Z (2 months ago)
- Topics: cygwin, go, golang, isatty, msys2, website
- Language: Go
- Homepage: http://godoc.org/github.com/mattn/go-isatty
- Size: 61.5 KB
- Stars: 831
- Watchers: 12
- Forks: 108
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-go - go-isatty - isatty for golang. (Command Line / Advanced Console UIs)
- fucking-awesome-go - go-isatty - isatty for golang. (Command Line / Advanced Console UIs)
- awesome-ccamel - mattn/go-isatty - (Go)
- awesome-go - go-isatty - isatty for golang. (Command Line / Advanced Console UIs)
- go-awesome - go-isatty - TTY environment assessment (Open source library / Command Line)
- awesome-go - go-isatty - isatty for golang. (Command Line / Advanced Console UIs)
- awesome-go-extra - go-isatty - 04-01T01:53:09Z|2022-08-15T05:52:43Z| (Build Automation / Advanced Console UIs)
- awesome-go-with-stars - go-isatty - isatty for golang. (Command Line / Advanced Console UIs)
- awesome-go - go-isatty - ★ 276 (Command Line)
- awesome-go-cn - go-isatty - isatty) (命令行 / 高级控制台用户界面)
- awesome-go-plus - go-isatty - isatty for golang. ![stars](https://img.shields.io/badge/stars-842-blue) (Command Line / Advanced Console UIs)
- awesome-go-plus - go-isatty - isatty for golang. ![stars](https://img.shields.io/badge/stars-841-blue) (Command Line / Advanced Console UIs)
README
# go-isatty
[![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty)
[![Codecov](https://codecov.io/gh/mattn/go-isatty/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-isatty)
[![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master)
[![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty)isatty for golang
## Usage
```go
package mainimport (
"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
* k-takata: base idea for IsCygwinTerminal
https://github.com/k-takata/go-iscygpty