Skip to content

Commit

Permalink
disable spinner on windows system
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyYe committed May 7, 2021
1 parent bd31641 commit 0940fc6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"os"
"os/signal"
"runtime"
"strings"
"time"

Expand Down Expand Up @@ -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... "
Expand Down

0 comments on commit 0940fc6

Please sign in to comment.