mirror of
https://gogs.blitter.com/RLabs/xs
synced 2024-08-14 10:26:42 +00:00
3092ec2881
2/3 Added vendor/ dir to lock down dependent pkg versions. The author of git.schwanenlied.me/yawning/{chacha20,newhope,kyber}.git has copied their repos to gitlab.com/yawning/ but some imports of chacha20 from newhope still inconsistently refer to git.schwanenlied.me/, breaking build. Licenses for chacha20 also changed from CC0 to AGPL, which may or may not be an issue. Until the two aforementioned issues are resolved, locking to last-good versions is probably the best way forward for now. To build with vendored deps, use make VENDOR=1 clean all 3/3 Moved body of CI push script into bacillus/
50 lines
1.1 KiB
Markdown
50 lines
1.1 KiB
Markdown
# go-isatty
|
|
|
|
[![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty)
|
|
[![Build Status](https://travis-ci.org/mattn/go-isatty.svg?branch=master)](https://travis-ci.org/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 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
|
|
|
|
* k-takata: base idea for IsCygwinTerminal
|
|
|
|
https://github.com/k-takata/go-iscygpty
|