From eed1c0f832603c63deae9d5ffa2c4a6e611ed31f Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Wed, 20 Jun 2018 21:39:23 -0700 Subject: [PATCH 1/3] Fix GopherJS build tags The GopherJS build tag is "js" not "gopherjs" Signed-off-by: Christian Stewart --- terminal_bsd.go | 2 +- terminal_check_appengine.go | 2 +- terminal_check_notappengine.go | 2 +- terminal_linux.go | 2 +- text_formatter_js.go | 11 +++++++++++ text_formatter_other.go | 3 +++ 6 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 text_formatter_js.go create mode 100644 text_formatter_other.go diff --git a/terminal_bsd.go b/terminal_bsd.go index 4880d13..5b6212d 100644 --- a/terminal_bsd.go +++ b/terminal_bsd.go @@ -1,5 +1,5 @@ // +build darwin freebsd openbsd netbsd dragonfly -// +build !appengine,!gopherjs +// +build !appengine,!js package logrus diff --git a/terminal_check_appengine.go b/terminal_check_appengine.go index 3de08e8..26a2867 100644 --- a/terminal_check_appengine.go +++ b/terminal_check_appengine.go @@ -1,4 +1,4 @@ -// +build appengine gopherjs +// +build appengine js package logrus diff --git a/terminal_check_notappengine.go b/terminal_check_notappengine.go index 067047a..87f0b80 100644 --- a/terminal_check_notappengine.go +++ b/terminal_check_notappengine.go @@ -1,4 +1,4 @@ -// +build !appengine,!gopherjs +// +build !appengine,!js package logrus diff --git a/terminal_linux.go b/terminal_linux.go index f29a009..634e39b 100644 --- a/terminal_linux.go +++ b/terminal_linux.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 !appengine,!gopherjs +// +build !appengine,!js package logrus diff --git a/text_formatter_js.go b/text_formatter_js.go new file mode 100644 index 0000000..d52803a --- /dev/null +++ b/text_formatter_js.go @@ -0,0 +1,11 @@ +// +build js + +package logrus + +import ( + "io" +) + +func (f *TextFormatter) checkIfTerminal(w io.Writer) bool { + return false +} diff --git a/text_formatter_other.go b/text_formatter_other.go new file mode 100644 index 0000000..0d9704f --- /dev/null +++ b/text_formatter_other.go @@ -0,0 +1,3 @@ +// +build !js + +package logrus From da39da23485a153e5c9b7902e4b5cefbd924ef78 Mon Sep 17 00:00:00 2001 From: Kwok-kuen Cheung Date: Mon, 6 Aug 2018 00:43:49 +0800 Subject: [PATCH 2/3] Keep terminal check naming convention --- terminal_check_appengine.go | 2 +- text_formatter_js.go => terminal_check_js.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename text_formatter_js.go => terminal_check_js.go (51%) diff --git a/terminal_check_appengine.go b/terminal_check_appengine.go index 26a2867..2403de9 100644 --- a/terminal_check_appengine.go +++ b/terminal_check_appengine.go @@ -1,4 +1,4 @@ -// +build appengine js +// +build appengine package logrus diff --git a/text_formatter_js.go b/terminal_check_js.go similarity index 51% rename from text_formatter_js.go rename to terminal_check_js.go index d52803a..0c20975 100644 --- a/text_formatter_js.go +++ b/terminal_check_js.go @@ -6,6 +6,6 @@ import ( "io" ) -func (f *TextFormatter) checkIfTerminal(w io.Writer) bool { +func checkIfTerminal(w io.Writer) bool { return false } From d950ecd55bc2e1ddaf9af20cb8c6910a5633b031 Mon Sep 17 00:00:00 2001 From: Kwok-kuen Cheung Date: Mon, 6 Aug 2018 00:43:58 +0800 Subject: [PATCH 3/3] Remove unnecessary text_formatter file --- text_formatter_other.go | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 text_formatter_other.go diff --git a/text_formatter_other.go b/text_formatter_other.go deleted file mode 100644 index 0d9704f..0000000 --- a/text_formatter_other.go +++ /dev/null @@ -1,3 +0,0 @@ -// +build !js - -package logrus