From 305ec52856b8ad54a44e654885f97cd1d16ffda0 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Thu, 19 Sep 2019 11:06:10 +0200 Subject: [PATCH] Add terminal_check_js.go file, for compatibility with GopherJS --- terminal_check_bsd.go | 2 +- terminal_check_js.go | 7 +++++++ terminal_check_unix.go | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 terminal_check_js.go diff --git a/terminal_check_bsd.go b/terminal_check_bsd.go index 3c4f43f..4997899 100644 --- a/terminal_check_bsd.go +++ b/terminal_check_bsd.go @@ -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 } - diff --git a/terminal_check_js.go b/terminal_check_js.go new file mode 100644 index 0000000..ebdae3e --- /dev/null +++ b/terminal_check_js.go @@ -0,0 +1,7 @@ +// +build js + +package logrus + +func isTerminal(fd int) bool { + return false +} diff --git a/terminal_check_unix.go b/terminal_check_unix.go index 355dc96..cc4fe6e 100644 --- a/terminal_check_unix.go +++ b/terminal_check_unix.go @@ -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 } -