From 3317de26d88a9ecafc54a378804515894f0c73ad Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Thu, 16 Dec 2021 21:42:56 -0700 Subject: [PATCH] remove extra space (#127) * remove extra space Signed-off-by: Brian Downs * remove binary Signed-off-by: Brian Downs --- _example/main.go | 2 +- spinner.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_example/main.go b/_example/main.go index fb14f67..58d958d 100644 --- a/_example/main.go +++ b/_example/main.go @@ -16,7 +16,7 @@ func main() { s.UpdateCharSet(spinner.CharSets[9]) // Update spinner to use a different character set s.UpdateSpeed(100 * time.Millisecond) // Update the speed the spinner spins at - + s.HideCursor = true s.Prefix = "prefixed text: " // Prefix text before the spinner time.Sleep(4 * time.Second) s.Prefix = "" diff --git a/spinner.go b/spinner.go index 5f3a8bc..1464a61 100644 --- a/spinner.go +++ b/spinner.go @@ -301,14 +301,14 @@ func (s *Spinner) Start() { var outColor string if runtime.GOOS == "windows" { if s.Writer == os.Stderr { - outColor = fmt.Sprintf("\r%s%s%s ", s.Prefix, s.chars[i], s.Suffix) + outColor = fmt.Sprintf("\r%s%s%s", s.Prefix, s.chars[i], s.Suffix) } else { - outColor = fmt.Sprintf("\r%s%s%s ", s.Prefix, s.color(s.chars[i]), s.Suffix) + outColor = fmt.Sprintf("\r%s%s%s", s.Prefix, s.color(s.chars[i]), s.Suffix) } } else { - outColor = fmt.Sprintf("\r%s%s%s ", s.Prefix, s.color(s.chars[i]), s.Suffix) + outColor = fmt.Sprintf("\r%s%s%s", s.Prefix, s.color(s.chars[i]), s.Suffix) } - outPlain := fmt.Sprintf("\r%s%s%s ", s.Prefix, s.chars[i], s.Suffix) + outPlain := fmt.Sprintf("\r%s%s%s", s.Prefix, s.chars[i], s.Suffix) fmt.Fprint(s.Writer, outColor) s.lastOutput = outPlain delay := s.Delay