MCPcopy Create free account
hub / github.com/mattn/go-isatty

github.com/mattn/go-isatty

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.19 ↗ · + Follow · compare 4 versions
19 symbols 32 edges 10 files ⚖ MIT 14 documented · 74% updated 37d ago★ 924

Browse by type

Functions 19 Types & classes 0
What it actually does AI analysis from the code graph — generated when you open this
loading…
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

  • k-takata: base idea for IsCygwinTerminal

    https://github.com/k-takata/go-iscygpty

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 19

Languages

Go100%

Modules by API surface

isatty_windows.go5 symbols
isatty_tcgets.go2 symbols
isatty_solaris.go2 symbols
isatty_plan9.go2 symbols
isatty_others_test.go2 symbols
isatty_others.go2 symbols
isatty_bsd.go2 symbols
isatty_windows_test.go1 symbols
example_test.go1 symbols

Dependencies from manifests, versioned

golang.org/x/sysv0.6.0 · 1×

For agents

$ claude mcp add go-isatty \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page