Skip to content

Instantly share code, notes, and snippets.

@partkyle
Created December 2, 2014 17:51
Show Gist options
  • Select an option

  • Save partkyle/c1bd4bfdf6e696b3ddaf to your computer and use it in GitHub Desktop.

Select an option

Save partkyle/c1bd4bfdf6e696b3ddaf to your computer and use it in GitHub Desktop.
Single Progress line cursor
package main
import (
"fmt"
"strings"
"time"
)
func main() {
for i := 1; i <= 100; i++ {
fmt.Printf("[%s%s] %d%%\r", strings.Repeat("=", i), strings.Repeat(" ", 100-i), i)
time.Sleep(100 * time.Millisecond)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment