log, vendor: vendor in log15 inline into our codebase
This commit is contained in:
9
log/term/terminal_solaris.go
Normal file
9
log/term/terminal_solaris.go
Normal file
@ -0,0 +1,9 @@
|
||||
package term
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
// IsTty returns true if the given file descriptor is a terminal.
|
||||
func IsTty(fd uintptr) bool {
|
||||
_, err := unix.IoctlGetTermios(int(fd), unix.TCGETA)
|
||||
return err == nil
|
||||
}
|
Reference in New Issue
Block a user