github.com/yinchengtsinghua/golang-Eos-dpos-Ethereum@v0.0.0-20190121132951-92cc4225ed8e/log/term/terminal_solaris.go (about) 1 2 //此源码被清华学神尹成大魔王专业翻译分析并修改 3 //尹成QQ77025077 4 //尹成微信18510341407 5 //尹成所在QQ群721929980 6 //尹成邮箱 yinc13@mails.tsinghua.edu.cn 7 //尹成毕业于清华大学,微软区块链领域全球最有价值专家 8 //https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 9 package term 10 11 import "golang.org/x/sys/unix" 12 13 //如果给定的文件描述符是终端,则istty返回true。 14 func IsTty(fd uintptr) bool { 15 _, err := unix.IoctlGetTermios(int(fd), unix.TCGETA) 16 return err == nil 17 }