Skip to content

Commit

Permalink
Merge pull request sirupsen#1024 from flimzy/gopherjs
Browse files Browse the repository at this point in the history
Add terminal_check_js.go file, for compatibility with GopherJS
  • Loading branch information
Edward Muller authored Oct 12, 2019
2 parents b8b0350 + 552178e commit 8598f72
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 8598f72

Please sign in to comment.