Skip to content

haaag/rotato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Rotato Logo

๐ŸŒ€ Rotato

GitHub go.mod Go version Linux Go Reference

Lightweight and highly customizable spinner library for Go, designed to enhance your command-line applications with visually appealing progress indicators. With 42 spinners to choose from, you can easily integrate dynamic loading animations into your projects.


Demo

๐ŸŽฌ More demos

You can check out the spinners with the following commands:

# simple demo.
go run github.com/haaag/rotato/example@latest -demo

# all registered rotatos.
go run github.com/haaag/rotato/example@latest -all

๐Ÿ“ฆ Installation

go get github.com/haaag/rotato@latest

๐Ÿš€ Example

There is a example in the example folder.

r := rotato.New(
    rotato.WithPrefix("Repo"),
    rotato.WithSpinnerColor(rotato.ColorBrightGreen),
    rotato.WithDoneColorMesg(rotato.ColorBrightGreen, rotato.ColorStyleItalic),
    rotato.WithFailColorMesg(rotato.ColorRed, rotato.ColorStyleBlink),
)
r.Start()
// do some stuff
repo := git.New("https://github.com/haaag/rotato")
r.UpdateMesg("Syncing Repo...")
if err := repo.Sync(); err != nil {
    r.Fail("Sync Failed!")
    return err
}
r.Done("Sync Completed!")

๐Ÿ—จ๏ธ Credits

This package uses symbols/spinners from this libraries, and of course ideas!

Thanks to:

About

๐ŸŒ€ simple spinner library for Go.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published