Popularity
6.6
Growing
Activity
3.6
Declining
445
9
57

Programming language: Go

go-isatty alternatives and similar packages

Based on the "Advanced Console UIs" category

Do you think we are missing an alternative of go-isatty or a related project?

Add another 'Advanced Console UIs' Package

README

go-isatty

Godoc Reference Codecov 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


*Note that all licence references and agreements mentioned in the go-isatty README section above are relevant to that project's source code only.