Add terminal_check_js.go file, for compatibility with GopherJS

This commit is contained in:
Jonathan Hall 2019-09-19 11:06:10 +02:00
parent de736cf91b
commit 305ec52856
3 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,5 @@
// +build darwin dragonfly freebsd netbsd openbsd
// +build !js
package logrus
@ -10,4 +11,3 @@ func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}

7
terminal_check_js.go Normal file
View File

@ -0,0 +1,7 @@
// +build js
package logrus
func isTerminal(fd int) bool {
return false
}

View File

@ -1,4 +1,5 @@
// +build linux aix
// +build !js
package logrus
@ -10,4 +11,3 @@ func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}