Created
September 15, 2017 03:42
-
-
Save hibooboo2/ddaa12831cca9dd38de59c47a20555b0 to your computer and use it in GitHub Desktop.
A spinner for go, using clock emoji.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"time" | |
"github.com/janeczku/go-spinner" | |
) | |
func main() { | |
s := spinner.StartNew("This may take some while...") | |
s.SetCharset([]string{ | |
"π", | |
"π§", | |
"π", | |
"π", | |
"π", | |
"π", | |
"π", | |
"π", | |
"π", | |
"π", | |
"π", | |
"π ", | |
"π", | |
"π‘", | |
"π", | |
"π’", | |
"π", | |
"π£", | |
"π", | |
"π€", | |
"π", | |
"π₯", | |
"π", | |
"π¦", | |
}) | |
// s.SetCharset([]string{".", ".", "\\", "/", "|", "*"}) | |
s.SetSpeed(time.Millisecond * 200) // something more productive here | |
time.Sleep(6 * time.Second) | |
s.Stop() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment