1 Star 0 Fork 0

kirileec/color

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
isatty_solaris.go 407 Bytes
一键复制 编辑 原始数据 按行查看 历史
linx 提交于 2020-02-10 12:04 +08:00 . 111
// +build solaris
// +build !appengine
package color
import (
"gitee.com/kirile/color/unix"
)
// IsTerminal returns true if the given file descriptor is a terminal.
// see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c
func IsTerminal(fd uintptr) bool {
var termio unix.Termio
err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
return err == nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/kirile/color.git
git@gitee.com:kirile/color.git
kirile
color
color
master

搜索帮助