From dfb0e1d797624ee17fdf28e6fe1e6005659fe0c5 Mon Sep 17 00:00:00 2001 From: Shintaro Kaneko Date: Sat, 2 Apr 2016 05:06:31 +0000 Subject: [PATCH] terminal: Include appengine tag to compile for GAE --- terminal_appengine.go | 8 ++++++++ terminal_bsd.go | 1 + terminal_linux.go | 2 ++ terminal_notwindows.go | 1 + terminal_solaris.go | 2 +- terminal_windows.go | 2 +- 6 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 terminal_appengine.go diff --git a/terminal_appengine.go b/terminal_appengine.go new file mode 100644 index 0000000..1960169 --- /dev/null +++ b/terminal_appengine.go @@ -0,0 +1,8 @@ +// +build appengine + +package logrus + +// IsTerminal returns true if stderr's file descriptor is a terminal. +func IsTerminal() bool { + return true +} diff --git a/terminal_bsd.go b/terminal_bsd.go index 71f8d67..5f6be4d 100644 --- a/terminal_bsd.go +++ b/terminal_bsd.go @@ -1,4 +1,5 @@ // +build darwin freebsd openbsd netbsd dragonfly +// +build !appengine package logrus diff --git a/terminal_linux.go b/terminal_linux.go index a2c0b40..308160c 100644 --- a/terminal_linux.go +++ b/terminal_linux.go @@ -3,6 +3,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build !appengine + package logrus import "syscall" diff --git a/terminal_notwindows.go b/terminal_notwindows.go index b343b3a..329038f 100644 --- a/terminal_notwindows.go +++ b/terminal_notwindows.go @@ -4,6 +4,7 @@ // license that can be found in the LICENSE file. // +build linux darwin freebsd openbsd netbsd dragonfly +// +build !appengine package logrus diff --git a/terminal_solaris.go b/terminal_solaris.go index 3e70bf7..a3c6f6e 100644 --- a/terminal_solaris.go +++ b/terminal_solaris.go @@ -1,4 +1,4 @@ -// +build solaris +// +build solaris,!appengine package logrus diff --git a/terminal_windows.go b/terminal_windows.go index 0146845..3727e8a 100644 --- a/terminal_windows.go +++ b/terminal_windows.go @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build windows +// +build windows,!appengine package logrus