README
wow
Beautiful spinners for Go commandline apps
Install
go get -u github.com/gernest/wow
Usage
package main
import (
"os"
"time"
"github.com/gernest/wow"
"github.com/gernest/wow/spin"
)
func main() {
w := wow.New(os.Stdout, spin.Get(spin.Dots), "Such Spins")
w.Start()
time.Sleep(2 * time.Second)
w.Text("Very emojis").Spinner(spin.Get(spin.Hearts))
time.Sleep(2 * time.Second)
w.PersistWith(spin.Spinner{Frames: []string{"👍"}}, " Wow!")
}
Available spinners
Name | What it looks like |
---|---|
Star2 |
![]() |
GrowHorizontal |
![]() |
Squish |
![]() |
Toggle12 |
![]() |
Smiley |
![]() |
Hearts |
![]() |
Dots3 |
![]() |
Dots11 |
![]() |
Balloon |
![]() |
Clock |
![]() |
Dots4 |
![]() |
SquareCorners |
![]() |
CircleHalves |
![]() |
Star |
![]() |
Arc |
![]() |
Toggle13 |
![]() |
BoxBounce |
![]() |
Line2 |
![]() |
Pipe |
![]() |
Triangle |
![]() |
Shark |
![]() |
Line |
![]() |
Arrow |
![]() |
Earth |
![]() |
Dots5 |
![]() |
Toggle11 |
![]() |
CircleQuarters |
![]() |
Toggle9 |
![]() |
Dots9 |
![]() |
Bounce |
![]() |
Toggle2 |
![]() |
Toggle7 |
![]() |
Arrow3 |
![]() |
Moon |
![]() |
Dots6 |
![]() |
Christmas |
![]() |
Dots10 |
![]() |
Hamburger |
![]() |
BoxBounce2 |
![]() |
BouncingBar |
![]() |
Flip |
![]() |
Dots8 |
![]() |
Dots12 |
![]() |
Noise |
![]() |
Toggle3 |
![]() |
Toggle6 |
![]() |
Runner |
![]() |
Dqpb |
![]() |
Dots |
![]() |
Toggle4 |
![]() |
Monkey |
![]() |
Dots7 |
![]() |
SimpleDots |
![]() |
GrowVertical |
![]() |
Circle |
![]() |
Toggle |
![]() |
Toggle5 |
![]() |
Arrow2 |
![]() |
Dots2 |
![]() |
Toggle8 |
![]() |
Toggle10 |
![]() |
BouncingBall |
![]() |
SimpleDotsScrolling |
![]() |
Pong |
![]() |
Weather |
![]() |
Balloon2 |
![]() |
Documentation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForceOutput ¶
func ForceOutput(w *Wow)
ForceOutput forces all output even if not not outputting directly to a terminal
Types ¶
type Wow ¶
type Wow struct { IsTerminal bool // contains filtered or unexported fields }
Wow writes beautiful spinners on the terminal.
func (*Wow) Persist ¶
func (w *Wow) Persist()
Persist writes the last character of the currect spinner frames together with the text on stdout.
A new line is added at the end to ensure the text stay that way.
func (*Wow) PersistWith ¶
PersistWith writes the last frame of s together with text with a new line added to make it stick.