From 0940fc674c463717e34cd56e9842a24f8cf62253 Mon Sep 17 00:00:00 2001 From: Timothy Date: Fri, 7 May 2021 22:42:30 +0800 Subject: [PATCH] disable spinner on windows system --- lib/query.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/query.go b/lib/query.go index 428a97f..4bf9dff 100644 --- a/lib/query.go +++ b/lib/query.go @@ -7,6 +7,7 @@ import ( "net/http" "os" "os/signal" + "runtime" "strings" "time" @@ -64,6 +65,12 @@ func (this QueryParam) DoQuery() { //Init spinner var s *spinner.Spinner + + // disable the spinner on windows system + if runtime.GOOS == "windows" { + this.IsQuiet = true + } + if !this.IsQuiet { s = spinner.New(spinner.CharSets[35], 100*time.Millisecond) s.Prefix = "Querying... "