mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-07 11:11:13 +00:00
dbf9188792
```bash GO111MODULE=on go get github.com/hashicorp/terraform@pluginsdk-v0.12-early7 GO111MODULE=on go mod vendor GO111MODULE=on go mod tidy ```
19 lines
452 B
Go
19 lines
452 B
Go
// +build linux
|
|
// +build !appengine
|
|
|
|
package isatty
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
// IsTerminal return true if the file descriptor is terminal.
|
|
func IsTerminal(fd uintptr) bool {
|
|
_, err := unix.IoctlGetTermios(int(fd), unix.TCGETS)
|
|
return err == nil
|
|
}
|
|
|
|
// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
|
|
// terminal. This is also always false on this environment.
|
|
func IsCygwinTerminal(fd uintptr) bool {
|
|
return false
|
|
}
|