Skip to content

Commit

Permalink
remove extra space (#127)
Browse files Browse the repository at this point in the history
* remove extra space

Signed-off-by: Brian Downs <brian.downs@gmail.com>

* remove binary

Signed-off-by: Brian Downs <brian.downs@gmail.com>
  • Loading branch information
briandowns committed Dec 17, 2021
1 parent 12b31a6 commit 3317de2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion _example/main.go
Expand Up @@ -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 = ""
Expand Down
8 changes: 4 additions & 4 deletions spinner.go
Expand Up @@ -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
Expand Down

0 comments on commit 3317de2

Please sign in to comment.