Aucune description

Olivier Mengué b6ee8e8f7b Move example to godoc il y a 8 ans
.travis.yml 018779d6e8 remove sudo il y a 8 ans
LICENSE f60d253179 Added license file. il y a 10 ans
README.md 9622e0cc9d fix badges il y a 8 ans
doc.go d8798807d8 godoc il y a 11 ans
example_test.go b6ee8e8f7b Move example to godoc il y a 8 ans
isatty_appengine.go 2c84d1a242 Add isCygwinTerminal to non-appengine environments il y a 8 ans
isatty_bsd.go 089e34f010 Add dragonfly to bsd build il y a 9 ans
isatty_linux.go ca19903305 Support for AppEngine classic il y a 10 ans
isatty_others.go 2c84d1a242 Add isCygwinTerminal to non-appengine environments il y a 8 ans
isatty_others_test.go 50daa11e01 add test il y a 8 ans
isatty_solaris.go ca19903305 Support for AppEngine classic il y a 10 ans
isatty_windows.go 928cf5943f fixes for review il y a 9 ans
isatty_windows_test.go 05d3780075 add build costraint il y a 9 ans

README.md

go-isatty

Godoc Reference Build Status 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