From 4c9ba53bd1041286dc163c684e02821a22a823ff Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Thu, 31 Oct 2024 15:49:22 -0400 Subject: [PATCH] fix: lint if-else error --- query.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/query.go b/query.go index 85134385..bff51cdc 100644 --- a/query.go +++ b/query.go @@ -35,14 +35,15 @@ func backgroundColor(in *os.File, out *os.File) (color.Color, error) { func BackgroundColor(in *os.File, out *os.File) (bg color.Color, err error) { if runtime.GOOS == "windows" { return backgroundColor(in, out) - } else { - // NOTE: On Unix, one of the given files must be a tty. - for _, f := range []*os.File{in, out} { - if bg, err = backgroundColor(f, f); err == nil { - return bg, nil - } + } + + // NOTE: On Unix, one of the given files must be a tty. + for _, f := range []*os.File{in, out} { + if bg, err = backgroundColor(f, f); err == nil { + return bg, nil } } + return }