Skip to content

Commit

Permalink
Add terminal_check_js.go file, for compatibility with GopherJS
Browse files Browse the repository at this point in the history
  • Loading branch information
flimzy committed Sep 19, 2019
1 parent eee1138 commit 552178e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion terminal_check_bsd.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build darwin dragonfly freebsd netbsd openbsd
// +build !js

package logrus

Expand All @@ -10,4 +11,3 @@ func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}

7 changes: 7 additions & 0 deletions terminal_check_js.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// +build js

package logrus

func isTerminal(fd int) bool {
return false
}
2 changes: 1 addition & 1 deletion terminal_check_unix.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build linux aix
// +build !js

package logrus

Expand All @@ -10,4 +11,3 @@ func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}

0 comments on commit 552178e

Please sign in to comment.