diff --git a/.gitignore b/.gitignore index 2fc4dc6..b682ade 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ discovery .DS_Store -.idea \ No newline at end of file +.idea +*.yaml +discovery-p2p diff --git a/cli/root.go b/cli/root.go index 7718893..8bc43d0 100644 --- a/cli/root.go +++ b/cli/root.go @@ -1,10 +1,7 @@ package cli import ( - "fmt" "log" - "sync" - "time" "github.com/DataDrake/cli-ng/v2/cmd" ) @@ -38,24 +35,3 @@ func checkErr(err error) { log.Fatal(err) } } - -// Spinner is an array of the progression of the spinner. -var Spinner = []string{"|", "/", "-", "\\"} - -// SpinnerWait displays the actual spinner -func SpinnerWait(done chan int, message string, wg *sync.WaitGroup) { - ticker := time.NewTicker(time.Millisecond * 128) - frameCounter := 0 - for { - select { - case <-done: - wg.Done() - return - default: - <-ticker.C - ind := frameCounter % len(Spinner) - fmt.Printf("\r[%v] "+message, Spinner[ind]) - frameCounter++ - } - } -}