diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-17 02:30:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-17 02:30:54 -0700 |
commit | 3d7a8cf2af43a2d315fff7b8f74ae3d039f68dd0 (patch) | |
tree | 6fe1fe47414717662d14a6e223e26ef803517f92 /vendor/github.com/mattn/go-isatty/isatty_tcgets.go | |
parent | 9439b699b8940e2caf84cc29026b0beb70a5a2bb (diff) | |
parent | 310eae4ba44bc1c98c5cc5995f1f183b8ac432b1 (diff) | |
download | podman-3d7a8cf2af43a2d315fff7b8f74ae3d039f68dd0.tar.gz podman-3d7a8cf2af43a2d315fff7b8f74ae3d039f68dd0.tar.bz2 podman-3d7a8cf2af43a2d315fff7b8f74ae3d039f68dd0.zip |
Merge pull request #9714 from rhatdan/build
Switch all builds to pull-never
Diffstat (limited to 'vendor/github.com/mattn/go-isatty/isatty_tcgets.go')
-rw-r--r-- | vendor/github.com/mattn/go-isatty/isatty_tcgets.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/github.com/mattn/go-isatty/isatty_tcgets.go b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go new file mode 100644 index 000000000..31a1ca973 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_tcgets.go @@ -0,0 +1,18 @@ +// +build linux aix +// +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 +} |