Popularity
7.1
Stable
Activity
1.6
-
790
12
105

Programming language: Go
License: MIT License

go-isatty alternatives and similar packages

Based on the "Advanced Console UIs" category.
Alternatively, view go-isatty alternatives based on common mentions on social networks and blogs.

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.