GitHub - mattn/go-isatty (original) (raw)

Skip to content

Sign in

Appearance settings

View all features

View all solutions

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Sign in

Sign up

Appearance settings

mattn / go-isatty Public

godoc.org/github.com/mattn/go-isatty

License

MIT license

881 stars 112 forks Branches Tags Activity

Star

Notifications You must be signed in to change notification settings

Additional navigation options

BranchesTags

Folders and files

Name Name Last commit message Last commit date
Latest commitHistory134 Commits
.github .github
LICENSE LICENSE
README.md README.md
doc.go doc.go
example_test.go example_test.go
go.mod go.mod
go.sum go.sum
go.test.sh go.test.sh
isatty_bsd.go isatty_bsd.go
isatty_others.go isatty_others.go
isatty_others_test.go isatty_others_test.go
isatty_plan9.go isatty_plan9.go
isatty_solaris.go isatty_solaris.go
isatty_tcgets.go isatty_tcgets.go
isatty_windows.go isatty_windows.go
isatty_windows_test.go isatty_windows_test.go

Repository files navigation

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

About

godoc.org/github.com/mattn/go-isatty

Topics

go golang website cygwin msys2 isatty

Resources

Readme

License

MIT license

Activity

Stars

881 stars

Watchers

9 watching

Forks

112 forks

Report repository

Releases

20 tags

Packages

No packages published

Contributors28

+ 14 contributors

Languages