Merge pull request #1024 from flimzy/gopherjs

Add terminal_check_js.go file, for compatibility with GopherJS
This commit is contained in:
Edward Muller
2019-10-12 10:59:10 -07:00
committed by GitHub
3 changed files with 9 additions and 2 deletions
+1 -1
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
View File
@@ -0,0 +1,7 @@
// +build js
package logrus
func isTerminal(fd int) bool {
return false
}
+1 -1
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
}