Skip to content

Commit

Permalink
clean up booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlice committed Jun 3, 2021
1 parent 435e583 commit bc85972
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion commands/helpers.go
Expand Up @@ -18,13 +18,17 @@ func NewSpinner() *spinner.Spinner {
// NewSpinner returns a nicely formatted spinner for display while users are waiting.
func NewSpinner(txt string, logWriters *LogWriters) (s *spinner.Spinner) {
log.Debug().Msg(txt)
s = spinner.New(spinner.CharSets[14], 450*time.Millisecond, spinner.WithWriter(logWriters.ConsoleOnly))
s = spinner.New(spinner.CharSets[1], 50*time.Millisecond, spinner.WithWriter(logWriters.CarriageReturnWriter))
// s.HideCursor = true
err := s.Color("cyan")
if err != nil {
// have an internal fit about it
log.Debug().Msg("couldn't set the color on the spinner 🥺")
}
s.Prefix = fmt.Sprintf("%s... ", txt)
s.FinalMSG = fmt.Sprintf("%s... ✔️\n", txt)
s.Start()
time.Sleep(1000 * time.Millisecond)
s.Restart()
return s
}

0 comments on commit bc85972

Please sign in to comment.