spinner

package module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 2 Imported by: 0

README

go-spinners

GitHub release (latest by date) Build Go Report Card

70+ spinners for use in terminal Go apps.

Demo

This repo is autogenerated from sindresorhus/cli-spinners.

Intended to be used with schollz/progressbar, but the spinners will work with any tool that accepts a []string.

Installation

go get github.com/gabe565/go-spinners

Usage

See spinners.go for a list of available spinners, or see one of the preview pages.

Also see examples.

Preview

See all spinners at once or one at the time.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Dots = Spinner{
		Frames:   []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"},
		Interval: 80 * time.Millisecond,
		Name:     "dots",
	}

	Dots2 = Spinner{
		Frames:   []string{"⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"},
		Interval: 80 * time.Millisecond,
		Name:     "dots2",
	}

	Dots3 = Spinner{
		Frames:   []string{"⠋", "⠙", "⠚", "⠞", "⠖", "⠦", "⠴", "⠲", "⠳", "⠓"},
		Interval: 80 * time.Millisecond,
		Name:     "dots3",
	}

	Dots4 = Spinner{
		Frames:   []string{"⠄", "⠆", "⠇", "⠋", "⠙", "⠸", "⠰", "⠠", "⠰", "⠸", "⠙", "⠋", "⠇", "⠆"},
		Interval: 80 * time.Millisecond,
		Name:     "dots4",
	}

	Dots5 = Spinner{
		Frames:   []string{"⠋", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋"},
		Interval: 80 * time.Millisecond,
		Name:     "dots5",
	}

	Dots6 = Spinner{
		Frames:   []string{"⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠴", "⠲", "⠒", "⠂", "⠂", "⠒", "⠚", "⠙", "⠉", "⠁"},
		Interval: 80 * time.Millisecond,
		Name:     "dots6",
	}

	Dots7 = Spinner{
		Frames:   []string{"⠈", "⠉", "⠋", "⠓", "⠒", "⠐", "⠐", "⠒", "⠖", "⠦", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈"},
		Interval: 80 * time.Millisecond,
		Name:     "dots7",
	}

	Dots8 = Spinner{
		Frames:   []string{"⠁", "⠁", "⠉", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠤", "⠄", "⠄", "⠤", "⠠", "⠠", "⠤", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋", "⠉", "⠈", "⠈"},
		Interval: 80 * time.Millisecond,
		Name:     "dots8",
	}

	Dots9 = Spinner{
		Frames:   []string{"⢹", "⢺", "⢼", "⣸", "⣇", "⡧", "⡗", "⡏"},
		Interval: 80 * time.Millisecond,
		Name:     "dots9",
	}

	Dots10 = Spinner{
		Frames:   []string{"⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"},
		Interval: 80 * time.Millisecond,
		Name:     "dots10",
	}

	Dots11 = Spinner{
		Frames:   []string{"⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"},
		Interval: 100 * time.Millisecond,
		Name:     "dots11",
	}

	Dots12 = Spinner{
		Frames:   []string{"⢀⠀", "⡀⠀", "⠄⠀", "⢂⠀", "⡂⠀", "⠅⠀", "⢃⠀", "⡃⠀", "⠍⠀", "⢋⠀", "⡋⠀", "⠍⠁", "⢋⠁", "⡋⠁", "⠍⠉", "⠋⠉", "⠋⠉", "⠉⠙", "⠉⠙", "⠉⠩", "⠈⢙", "⠈⡙", "⢈⠩", "⡀⢙", "⠄⡙", "⢂⠩", "⡂⢘", "⠅⡘", "⢃⠨", "⡃⢐", "⠍⡐", "⢋⠠", "⡋⢀", "⠍⡁", "⢋⠁", "⡋⠁", "⠍⠉", "⠋⠉", "⠋⠉", "⠉⠙", "⠉⠙", "⠉⠩", "⠈⢙", "⠈⡙", "⠈⠩", "⠀⢙", "⠀⡙", "⠀⠩", "⠀⢘", "⠀⡘", "⠀⠨", "⠀⢐", "⠀⡐", "⠀⠠", "⠀⢀", "⠀⡀"},
		Interval: 80 * time.Millisecond,
		Name:     "dots12",
	}

	Dots13 = Spinner{
		Frames:   []string{"⣼", "⣹", "⢻", "⠿", "⡟", "⣏", "⣧", "⣶"},
		Interval: 80 * time.Millisecond,
		Name:     "dots13",
	}

	Dots14 = Spinner{
		Frames:   []string{"⠉⠉", "⠈⠙", "⠀⠹", "⠀⢸", "⠀⣰", "⢀⣠", "⣀⣀", "⣄⡀", "⣆⠀", "⡇⠀", "⠏⠀", "⠋⠁"},
		Interval: 80 * time.Millisecond,
		Name:     "dots14",
	}

	Dots8Bit = Spinner{
		Frames:   []string{"⠀", "⠁", "⠂", "⠃", "⠄", "⠅", "⠆", "⠇", "⡀", "⡁", "⡂", "⡃", "⡄", "⡅", "⡆", "⡇", "⠈", "⠉", "⠊", "⠋", "⠌", "⠍", "⠎", "⠏", "⡈", "⡉", "⡊", "⡋", "⡌", "⡍", "⡎", "⡏", "⠐", "⠑", "⠒", "⠓", "⠔", "⠕", "⠖", "⠗", "⡐", "⡑", "⡒", "⡓", "⡔", "⡕", "⡖", "⡗", "⠘", "⠙", "⠚", "⠛", "⠜", "⠝", "⠞", "⠟", "⡘", "⡙", "⡚", "⡛", "⡜", "⡝", "⡞", "⡟", "⠠", "⠡", "⠢", "⠣", "⠤", "⠥", "⠦", "⠧", "⡠", "⡡", "⡢", "⡣", "⡤", "⡥", "⡦", "⡧", "⠨", "⠩", "⠪", "⠫", "⠬", "⠭", "⠮", "⠯", "⡨", "⡩", "⡪", "⡫", "⡬", "⡭", "⡮", "⡯", "⠰", "⠱", "⠲", "⠳", "⠴", "⠵", "⠶", "⠷", "⡰", "⡱", "⡲", "⡳", "⡴", "⡵", "⡶", "⡷", "⠸", "⠹", "⠺", "⠻", "⠼", "⠽", "⠾", "⠿", "⡸", "⡹", "⡺", "⡻", "⡼", "⡽", "⡾", "⡿", "⢀", "⢁", "⢂", "⢃", "⢄", "⢅", "⢆", "⢇", "⣀", "⣁", "⣂", "⣃", "⣄", "⣅", "⣆", "⣇", "⢈", "⢉", "⢊", "⢋", "⢌", "⢍", "⢎", "⢏", "⣈", "⣉", "⣊", "⣋", "⣌", "⣍", "⣎", "⣏", "⢐", "⢑", "⢒", "⢓", "⢔", "⢕", "⢖", "⢗", "⣐", "⣑", "⣒", "⣓", "⣔", "⣕", "⣖", "⣗", "⢘", "⢙", "⢚", "⢛", "⢜", "⢝", "⢞", "⢟", "⣘", "⣙", "⣚", "⣛", "⣜", "⣝", "⣞", "⣟", "⢠", "⢡", "⢢", "⢣", "⢤", "⢥", "⢦", "⢧", "⣠", "⣡", "⣢", "⣣", "⣤", "⣥", "⣦", "⣧", "⢨", "⢩", "⢪", "⢫", "⢬", "⢭", "⢮", "⢯", "⣨", "⣩", "⣪", "⣫", "⣬", "⣭", "⣮", "⣯", "⢰", "⢱", "⢲", "⢳", "⢴", "⢵", "⢶", "⢷", "⣰", "⣱", "⣲", "⣳", "⣴", "⣵", "⣶", "⣷", "⢸", "⢹", "⢺", "⢻", "⢼", "⢽", "⢾", "⢿", "⣸", "⣹", "⣺", "⣻", "⣼", "⣽", "⣾", "⣿"},
		Interval: 80 * time.Millisecond,
		Name:     "dots8Bit",
	}

	DotsCircle = Spinner{
		Frames:   []string{"⢎ ", "⠎⠁", "⠊⠑", "⠈⠱", " ⡱", "⢀⡰", "⢄⡠", "⢆⡀"},
		Interval: 80 * time.Millisecond,
		Name:     "dotsCircle",
	}

	Sand = Spinner{
		Frames:   []string{"⠁", "⠂", "⠄", "⡀", "⡈", "⡐", "⡠", "⣀", "⣁", "⣂", "⣄", "⣌", "⣔", "⣤", "⣥", "⣦", "⣮", "⣶", "⣷", "⣿", "⡿", "⠿", "⢟", "⠟", "⡛", "⠛", "⠫", "⢋", "⠋", "⠍", "⡉", "⠉", "⠑", "⠡", "⢁"},
		Interval: 80 * time.Millisecond,
		Name:     "sand",
	}

	Line = Spinner{
		Frames:   []string{"-", "\\", "|", "/"},
		Interval: 130 * time.Millisecond,
		Name:     "line",
	}

	Line2 = Spinner{
		Frames:   []string{"⠂", "-", "–", "—", "–", "-"},
		Interval: 100 * time.Millisecond,
		Name:     "line2",
	}

	Pipe = Spinner{
		Frames:   []string{"┤", "┘", "┴", "└", "├", "┌", "┬", "┐"},
		Interval: 100 * time.Millisecond,
		Name:     "pipe",
	}

	SimpleDots = Spinner{
		Frames:   []string{".  ", ".. ", "...", "   "},
		Interval: 400 * time.Millisecond,
		Name:     "simpleDots",
	}

	SimpleDotsScrolling = Spinner{
		Frames:   []string{".  ", ".. ", "...", " ..", "  .", "   "},
		Interval: 200 * time.Millisecond,
		Name:     "simpleDotsScrolling",
	}

	Star = Spinner{
		Frames:   []string{"✶", "✸", "✹", "✺", "✹", "✷"},
		Interval: 70 * time.Millisecond,
		Name:     "star",
	}

	Star2 = Spinner{
		Frames:   []string{"+", "x", "*"},
		Interval: 80 * time.Millisecond,
		Name:     "star2",
	}

	Flip = Spinner{
		Frames:   []string{"_", "_", "_", "-", "`", "`", "'", "´", "-", "_", "_", "_"},
		Interval: 70 * time.Millisecond,
		Name:     "flip",
	}

	Hamburger = Spinner{
		Frames:   []string{"☱", "☲", "☴"},
		Interval: 100 * time.Millisecond,
		Name:     "hamburger",
	}

	GrowVertical = Spinner{
		Frames:   []string{"▁", "▃", "▄", "▅", "▆", "▇", "▆", "▅", "▄", "▃"},
		Interval: 120 * time.Millisecond,
		Name:     "growVertical",
	}

	GrowHorizontal = Spinner{
		Frames:   []string{"▏", "▎", "▍", "▌", "▋", "▊", "▉", "▊", "▋", "▌", "▍", "▎"},
		Interval: 120 * time.Millisecond,
		Name:     "growHorizontal",
	}

	Balloon = Spinner{
		Frames:   []string{" ", ".", "o", "O", "@", "*", " "},
		Interval: 140 * time.Millisecond,
		Name:     "balloon",
	}

	Balloon2 = Spinner{
		Frames:   []string{".", "o", "O", "°", "O", "o", "."},
		Interval: 120 * time.Millisecond,
		Name:     "balloon2",
	}

	Noise = Spinner{
		Frames:   []string{"▓", "▒", "░"},
		Interval: 100 * time.Millisecond,
		Name:     "noise",
	}

	Bounce = Spinner{
		Frames:   []string{"⠁", "⠂", "⠄", "⠂"},
		Interval: 120 * time.Millisecond,
		Name:     "bounce",
	}

	BoxBounce = Spinner{
		Frames:   []string{"▖", "▘", "▝", "▗"},
		Interval: 120 * time.Millisecond,
		Name:     "boxBounce",
	}

	BoxBounce2 = Spinner{
		Frames:   []string{"▌", "▀", "▐", "▄"},
		Interval: 100 * time.Millisecond,
		Name:     "boxBounce2",
	}

	Triangle = Spinner{
		Frames:   []string{"◢", "◣", "◤", "◥"},
		Interval: 50 * time.Millisecond,
		Name:     "triangle",
	}

	Binary = Spinner{
		Frames:   []string{"010010", "001100", "100101", "111010", "111101", "010111", "101011", "111000", "110011", "110101"},
		Interval: 80 * time.Millisecond,
		Name:     "binary",
	}

	Arc = Spinner{
		Frames:   []string{"◜", "◠", "◝", "◞", "◡", "◟"},
		Interval: 100 * time.Millisecond,
		Name:     "arc",
	}

	Circle = Spinner{
		Frames:   []string{"◡", "⊙", "◠"},
		Interval: 120 * time.Millisecond,
		Name:     "circle",
	}

	SquareCorners = Spinner{
		Frames:   []string{"◰", "◳", "◲", "◱"},
		Interval: 180 * time.Millisecond,
		Name:     "squareCorners",
	}

	CircleQuarters = Spinner{
		Frames:   []string{"◴", "◷", "◶", "◵"},
		Interval: 120 * time.Millisecond,
		Name:     "circleQuarters",
	}

	CircleHalves = Spinner{
		Frames:   []string{"◐", "◓", "◑", "◒"},
		Interval: 50 * time.Millisecond,
		Name:     "circleHalves",
	}

	Squish = Spinner{
		Frames:   []string{"╫", "╪"},
		Interval: 100 * time.Millisecond,
		Name:     "squish",
	}

	Toggle = Spinner{
		Frames:   []string{"⊶", "⊷"},
		Interval: 250 * time.Millisecond,
		Name:     "toggle",
	}

	Toggle2 = Spinner{
		Frames:   []string{"▫", "▪"},
		Interval: 80 * time.Millisecond,
		Name:     "toggle2",
	}

	Toggle3 = Spinner{
		Frames:   []string{"□", "■"},
		Interval: 120 * time.Millisecond,
		Name:     "toggle3",
	}

	Toggle4 = Spinner{
		Frames:   []string{"■", "□", "▪", "▫"},
		Interval: 100 * time.Millisecond,
		Name:     "toggle4",
	}

	Toggle5 = Spinner{
		Frames:   []string{"▮", "▯"},
		Interval: 100 * time.Millisecond,
		Name:     "toggle5",
	}

	Toggle6 = Spinner{
		Frames:   []string{"ဝ", "၀"},
		Interval: 300 * time.Millisecond,
		Name:     "toggle6",
	}

	Toggle7 = Spinner{
		Frames:   []string{"⦾", "⦿"},
		Interval: 80 * time.Millisecond,
		Name:     "toggle7",
	}

	Toggle8 = Spinner{
		Frames:   []string{"◍", "◌"},
		Interval: 100 * time.Millisecond,
		Name:     "toggle8",
	}

	Toggle9 = Spinner{
		Frames:   []string{"◉", "◎"},
		Interval: 100 * time.Millisecond,
		Name:     "toggle9",
	}

	Toggle10 = Spinner{
		Frames:   []string{"㊂", "㊀", "㊁"},
		Interval: 100 * time.Millisecond,
		Name:     "toggle10",
	}

	Toggle11 = Spinner{
		Frames:   []string{"⧇", "⧆"},
		Interval: 50 * time.Millisecond,
		Name:     "toggle11",
	}

	Toggle12 = Spinner{
		Frames:   []string{"☗", "☖"},
		Interval: 120 * time.Millisecond,
		Name:     "toggle12",
	}

	Toggle13 = Spinner{
		Frames:   []string{"=", "*", "-"},
		Interval: 80 * time.Millisecond,
		Name:     "toggle13",
	}

	Arrow = Spinner{
		Frames:   []string{"←", "↖", "↑", "↗", "→", "↘", "↓", "↙"},
		Interval: 100 * time.Millisecond,
		Name:     "arrow",
	}

	Arrow2 = Spinner{
		Frames:   []string{"⬆️ ", "↗️ ", "➡️ ", "↘️ ", "⬇️ ", "↙️ ", "⬅️ ", "↖️ "},
		Interval: 80 * time.Millisecond,
		Name:     "arrow2",
	}

	Arrow3 = Spinner{
		Frames:   []string{"▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"},
		Interval: 120 * time.Millisecond,
		Name:     "arrow3",
	}

	BouncingBar = Spinner{
		Frames:   []string{"[    ]", "[=   ]", "[==  ]", "[=== ]", "[====]", "[ ===]", "[  ==]", "[   =]", "[    ]", "[   =]", "[  ==]", "[ ===]", "[====]", "[=== ]", "[==  ]", "[=   ]"},
		Interval: 80 * time.Millisecond,
		Name:     "bouncingBar",
	}

	BouncingBall = Spinner{
		Frames:   []string{"( ●    )", "(  ●   )", "(   ●  )", "(    ● )", "(     ●)", "(    ● )", "(   ●  )", "(  ●   )", "( ●    )", "(●     )"},
		Interval: 80 * time.Millisecond,
		Name:     "bouncingBall",
	}

	Smiley = Spinner{
		Frames:   []string{"😄 ", "😝 "},
		Interval: 200 * time.Millisecond,
		Name:     "smiley",
	}

	Monkey = Spinner{
		Frames:   []string{"🙈 ", "🙈 ", "🙉 ", "🙊 "},
		Interval: 300 * time.Millisecond,
		Name:     "monkey",
	}

	Hearts = Spinner{
		Frames:   []string{"💛 ", "💙 ", "💜 ", "💚 ", "❤️ "},
		Interval: 100 * time.Millisecond,
		Name:     "hearts",
	}

	Clock = Spinner{
		Frames:   []string{"🕛 ", "🕐 ", "🕑 ", "🕒 ", "🕓 ", "🕔 ", "🕕 ", "🕖 ", "🕗 ", "🕘 ", "🕙 ", "🕚 "},
		Interval: 100 * time.Millisecond,
		Name:     "clock",
	}

	Earth = Spinner{
		Frames:   []string{"🌍 ", "🌎 ", "🌏 "},
		Interval: 180 * time.Millisecond,
		Name:     "earth",
	}

	Material = Spinner{
		Frames:   []string{"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "███████▁▁▁▁▁▁▁▁▁▁▁▁▁", "████████▁▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "██████████▁▁▁▁▁▁▁▁▁▁", "███████████▁▁▁▁▁▁▁▁▁", "█████████████▁▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁▁██████████████▁▁▁▁", "▁▁▁██████████████▁▁▁", "▁▁▁▁█████████████▁▁▁", "▁▁▁▁██████████████▁▁", "▁▁▁▁██████████████▁▁", "▁▁▁▁▁██████████████▁", "▁▁▁▁▁██████████████▁", "▁▁▁▁▁██████████████▁", "▁▁▁▁▁▁██████████████", "▁▁▁▁▁▁██████████████", "▁▁▁▁▁▁▁█████████████", "▁▁▁▁▁▁▁█████████████", "▁▁▁▁▁▁▁▁████████████", "▁▁▁▁▁▁▁▁████████████", "▁▁▁▁▁▁▁▁▁███████████", "▁▁▁▁▁▁▁▁▁███████████", "▁▁▁▁▁▁▁▁▁▁██████████", "▁▁▁▁▁▁▁▁▁▁██████████", "▁▁▁▁▁▁▁▁▁▁▁▁████████", "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "██████▁▁▁▁▁▁▁▁▁▁▁▁▁█", "████████▁▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "█████████▁▁▁▁▁▁▁▁▁▁▁", "███████████▁▁▁▁▁▁▁▁▁", "████████████▁▁▁▁▁▁▁▁", "████████████▁▁▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "██████████████▁▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁██████████████▁▁▁▁▁", "▁▁▁█████████████▁▁▁▁", "▁▁▁▁▁████████████▁▁▁", "▁▁▁▁▁████████████▁▁▁", "▁▁▁▁▁▁███████████▁▁▁", "▁▁▁▁▁▁▁▁█████████▁▁▁", "▁▁▁▁▁▁▁▁█████████▁▁▁", "▁▁▁▁▁▁▁▁▁█████████▁▁", "▁▁▁▁▁▁▁▁▁█████████▁▁", "▁▁▁▁▁▁▁▁▁▁█████████▁", "▁▁▁▁▁▁▁▁▁▁▁████████▁", "▁▁▁▁▁▁▁▁▁▁▁████████▁", "▁▁▁▁▁▁▁▁▁▁▁▁███████▁", "▁▁▁▁▁▁▁▁▁▁▁▁███████▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"},
		Interval: 17 * time.Millisecond,
		Name:     "material",
	}

	Moon = Spinner{
		Frames:   []string{"🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "},
		Interval: 80 * time.Millisecond,
		Name:     "moon",
	}

	Runner = Spinner{
		Frames:   []string{"🚶 ", "🏃 "},
		Interval: 140 * time.Millisecond,
		Name:     "runner",
	}

	Pong = Spinner{
		Frames:   []string{"▐⠂       ▌", "▐⠈       ▌", "▐ ⠂      ▌", "▐ ⠠      ▌", "▐  ⡀     ▌", "▐  ⠠     ▌", "▐   ⠂    ▌", "▐   ⠈    ▌", "▐    ⠂   ▌", "▐    ⠠   ▌", "▐     ⡀  ▌", "▐     ⠠  ▌", "▐      ⠂ ▌", "▐      ⠈ ▌", "▐       ⠂▌", "▐       ⠠▌", "▐       ⡀▌", "▐      ⠠ ▌", "▐      ⠂ ▌", "▐     ⠈  ▌", "▐     ⠂  ▌", "▐    ⠠   ▌", "▐    ⡀   ▌", "▐   ⠠    ▌", "▐   ⠂    ▌", "▐  ⠈     ▌", "▐  ⠂     ▌", "▐ ⠠      ▌", "▐ ⡀      ▌", "▐⠠       ▌"},
		Interval: 80 * time.Millisecond,
		Name:     "pong",
	}

	Shark = Spinner{
		Frames:   []string{"▐|\\____________▌", "▐_|\\___________▌", "▐__|\\__________▌", "▐___|\\_________▌", "▐____|\\________▌", "▐_____|\\_______▌", "▐______|\\______▌", "▐_______|\\_____▌", "▐________|\\____▌", "▐_________|\\___▌", "▐__________|\\__▌", "▐___________|\\_▌", "▐____________|\\▌", "▐____________/|▌", "▐___________/|_▌", "▐__________/|__▌", "▐_________/|___▌", "▐________/|____▌", "▐_______/|_____▌", "▐______/|______▌", "▐_____/|_______▌", "▐____/|________▌", "▐___/|_________▌", "▐__/|__________▌", "▐_/|___________▌", "▐/|____________▌"},
		Interval: 120 * time.Millisecond,
		Name:     "shark",
	}

	Dqpb = Spinner{
		Frames:   []string{"d", "q", "p", "b"},
		Interval: 100 * time.Millisecond,
		Name:     "dqpb",
	}

	Weather = Spinner{
		Frames:   []string{"☀️ ", "☀️ ", "☀️ ", "🌤 ", "⛅️ ", "🌥 ", "☁️ ", "🌧 ", "🌨 ", "🌧 ", "🌨 ", "🌧 ", "🌨 ", "⛈ ", "🌨 ", "🌧 ", "🌨 ", "☁️ ", "🌥 ", "⛅️ ", "🌤 ", "☀️ ", "☀️ "},
		Interval: 100 * time.Millisecond,
		Name:     "weather",
	}

	Christmas = Spinner{
		Frames:   []string{"🌲", "🎄"},
		Interval: 400 * time.Millisecond,
		Name:     "christmas",
	}

	Grenade = Spinner{
		Frames:   []string{"،  ", "′  ", " ´ ", " ‾ ", "  ⸌", "  ⸊", "  |", "  ⁎", "  ⁕", " ෴ ", "  ⁓", "   ", "   ", "   "},
		Interval: 80 * time.Millisecond,
		Name:     "grenade",
	}

	Point = Spinner{
		Frames:   []string{"∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"},
		Interval: 125 * time.Millisecond,
		Name:     "point",
	}

	Layer = Spinner{
		Frames:   []string{"-", "=", "≡"},
		Interval: 150 * time.Millisecond,
		Name:     "layer",
	}

	BetaWave = Spinner{
		Frames:   []string{"ρββββββ", "βρβββββ", "ββρββββ", "βββρβββ", "ββββρββ", "βββββρβ", "ββββββρ"},
		Interval: 80 * time.Millisecond,
		Name:     "betaWave",
	}

	FingerDance = Spinner{
		Frames:   []string{"🤘 ", "🤟 ", "🖖 ", "✋ ", "🤚 ", "👆 "},
		Interval: 160 * time.Millisecond,
		Name:     "fingerDance",
	}

	FistBump = Spinner{
		Frames:   []string{"🤜\u3000\u3000\u3000\u3000🤛 ", "🤜\u3000\u3000\u3000\u3000🤛 ", "🤜\u3000\u3000\u3000\u3000🤛 ", "\u3000🤜\u3000\u3000🤛\u3000 ", "\u3000\u3000🤜🤛\u3000\u3000 ", "\u3000🤜✨🤛\u3000\u3000 ", "🤜\u3000✨\u3000🤛\u3000 "},
		Interval: 80 * time.Millisecond,
		Name:     "fistBump",
	}

	SoccerHeader = Spinner{
		Frames:   []string{" 🧑⚽️       🧑 ", "🧑  ⚽️      🧑 ", "🧑   ⚽️     🧑 ", "🧑    ⚽️    🧑 ", "🧑     ⚽️   🧑 ", "🧑      ⚽️  🧑 ", "🧑       ⚽️🧑  ", "🧑      ⚽️  🧑 ", "🧑     ⚽️   🧑 ", "🧑    ⚽️    🧑 ", "🧑   ⚽️     🧑 ", "🧑  ⚽️      🧑 "},
		Interval: 80 * time.Millisecond,
		Name:     "soccerHeader",
	}

	Mindblown = Spinner{
		Frames:   []string{"😐 ", "😐 ", "😮 ", "😮 ", "😦 ", "😦 ", "😧 ", "😧 ", "🤯 ", "💥 ", "✨ ", "\u3000 ", "\u3000 ", "\u3000 "},
		Interval: 160 * time.Millisecond,
		Name:     "mindblown",
	}

	Speaker = Spinner{
		Frames:   []string{"🔈 ", "🔉 ", "🔊 ", "🔉 "},
		Interval: 160 * time.Millisecond,
		Name:     "speaker",
	}

	OrangePulse = Spinner{
		Frames:   []string{"🔸 ", "🔶 ", "🟠 ", "🟠 ", "🔶 "},
		Interval: 100 * time.Millisecond,
		Name:     "orangePulse",
	}

	BluePulse = Spinner{
		Frames:   []string{"🔹 ", "🔷 ", "🔵 ", "🔵 ", "🔷 "},
		Interval: 100 * time.Millisecond,
		Name:     "bluePulse",
	}

	OrangeBluePulse = Spinner{
		Frames:   []string{"🔸 ", "🔶 ", "🟠 ", "🟠 ", "🔶 ", "🔹 ", "🔷 ", "🔵 ", "🔵 ", "🔷 "},
		Interval: 100 * time.Millisecond,
		Name:     "orangeBluePulse",
	}

	TimeTravel = Spinner{
		Frames:   []string{"🕛 ", "🕚 ", "🕙 ", "🕘 ", "🕗 ", "🕖 ", "🕕 ", "🕔 ", "🕓 ", "🕒 ", "🕑 ", "🕐 "},
		Interval: 100 * time.Millisecond,
		Name:     "timeTravel",
	}

	Aesthetic = Spinner{
		Frames:   []string{"▰▱▱▱▱▱▱", "▰▰▱▱▱▱▱", "▰▰▰▱▱▱▱", "▰▰▰▰▱▱▱", "▰▰▰▰▰▱▱", "▰▰▰▰▰▰▱", "▰▰▰▰▰▰▰", "▰▱▱▱▱▱▱"},
		Interval: 80 * time.Millisecond,
		Name:     "aesthetic",
	}

	DwarfFortress = Spinner{
		Frames:   []string{" ██████£££  ", "☺██████£££  ", "☺██████£££  ", "☺▓█████£££  ", "☺▓█████£££  ", "☺▒█████£££  ", "☺▒█████£££  ", "☺░█████£££  ", "☺░█████£££  ", "☺ █████£££  ", " ☺█████£££  ", " ☺█████£££  ", " ☺▓████£££  ", " ☺▓████£££  ", " ☺▒████£££  ", " ☺▒████£££  ", " ☺░████£££  ", " ☺░████£££  ", " ☺ ████£££  ", "  ☺████£££  ", "  ☺████£££  ", "  ☺▓███£££  ", "  ☺▓███£££  ", "  ☺▒███£££  ", "  ☺▒███£££  ", "  ☺░███£££  ", "  ☺░███£££  ", "  ☺ ███£££  ", "   ☺███£££  ", "   ☺███£££  ", "   ☺▓██£££  ", "   ☺▓██£££  ", "   ☺▒██£££  ", "   ☺▒██£££  ", "   ☺░██£££  ", "   ☺░██£££  ", "   ☺ ██£££  ", "    ☺██£££  ", "    ☺██£££  ", "    ☺▓█£££  ", "    ☺▓█£££  ", "    ☺▒█£££  ", "    ☺▒█£££  ", "    ☺░█£££  ", "    ☺░█£££  ", "    ☺ █£££  ", "     ☺█£££  ", "     ☺█£££  ", "     ☺▓£££  ", "     ☺▓£££  ", "     ☺▒£££  ", "     ☺▒£££  ", "     ☺░£££  ", "     ☺░£££  ", "     ☺ £££  ", "      ☺£££  ", "      ☺£££  ", "      ☺▓££  ", "      ☺▓££  ", "      ☺▒££  ", "      ☺▒££  ", "      ☺░££  ", "      ☺░££  ", "      ☺ ££  ", "       ☺££  ", "       ☺££  ", "       ☺▓£  ", "       ☺▓£  ", "       ☺▒£  ", "       ☺▒£  ", "       ☺░£  ", "       ☺░£  ", "       ☺ £  ", "        ☺£  ", "        ☺£  ", "        ☺▓  ", "        ☺▓  ", "        ☺▒  ", "        ☺▒  ", "        ☺░  ", "        ☺░  ", "        ☺   ", "        ☺  &", "        ☺ ☼&", "       ☺ ☼ &", "       ☺☼  &", "      ☺☼  & ", "      ‼   & ", "     ☺   &  ", "    ‼    &  ", "   ☺    &   ", "  ‼     &   ", " ☺     &    ", "‼      &    ", "      &     ", "      &     ", "     &   ░  ", "     &   ▒  ", "    &    ▓  ", "    &    £  ", "   &    ░£  ", "   &    ▒£  ", "  &     ▓£  ", "  &     ££  ", " &     ░££  ", " &     ▒££  ", "&      ▓££  ", "&      £££  ", "      ░£££  ", "      ▒£££  ", "      ▓£££  ", "      █£££  ", "     ░█£££  ", "     ▒█£££  ", "     ▓█£££  ", "     ██£££  ", "    ░██£££  ", "    ▒██£££  ", "    ▓██£££  ", "    ███£££  ", "   ░███£££  ", "   ▒███£££  ", "   ▓███£££  ", "   ████£££  ", "  ░████£££  ", "  ▒████£££  ", "  ▓████£££  ", "  █████£££  ", " ░█████£££  ", " ▒█████£££  ", " ▓█████£££  ", " ██████£££  ", " ██████£££  "},
		Interval: 80 * time.Millisecond,
		Name:     "dwarfFortress",
	}
)
View Source
var Map = map[string]Spinner{
	"dots":                Dots,
	"dots2":               Dots2,
	"dots3":               Dots3,
	"dots4":               Dots4,
	"dots5":               Dots5,
	"dots6":               Dots6,
	"dots7":               Dots7,
	"dots8":               Dots8,
	"dots9":               Dots9,
	"dots10":              Dots10,
	"dots11":              Dots11,
	"dots12":              Dots12,
	"dots13":              Dots13,
	"dots14":              Dots14,
	"dots8Bit":            Dots8Bit,
	"dotsCircle":          DotsCircle,
	"sand":                Sand,
	"line":                Line,
	"line2":               Line2,
	"pipe":                Pipe,
	"simpleDots":          SimpleDots,
	"simpleDotsScrolling": SimpleDotsScrolling,
	"star":                Star,
	"star2":               Star2,
	"flip":                Flip,
	"hamburger":           Hamburger,
	"growVertical":        GrowVertical,
	"growHorizontal":      GrowHorizontal,
	"balloon":             Balloon,
	"balloon2":            Balloon2,
	"noise":               Noise,
	"bounce":              Bounce,
	"boxBounce":           BoxBounce,
	"boxBounce2":          BoxBounce2,
	"triangle":            Triangle,
	"binary":              Binary,
	"arc":                 Arc,
	"circle":              Circle,
	"squareCorners":       SquareCorners,
	"circleQuarters":      CircleQuarters,
	"circleHalves":        CircleHalves,
	"squish":              Squish,
	"toggle":              Toggle,
	"toggle2":             Toggle2,
	"toggle3":             Toggle3,
	"toggle4":             Toggle4,
	"toggle5":             Toggle5,
	"toggle6":             Toggle6,
	"toggle7":             Toggle7,
	"toggle8":             Toggle8,
	"toggle9":             Toggle9,
	"toggle10":            Toggle10,
	"toggle11":            Toggle11,
	"toggle12":            Toggle12,
	"toggle13":            Toggle13,
	"arrow":               Arrow,
	"arrow2":              Arrow2,
	"arrow3":              Arrow3,
	"bouncingBar":         BouncingBar,
	"bouncingBall":        BouncingBall,
	"smiley":              Smiley,
	"monkey":              Monkey,
	"hearts":              Hearts,
	"clock":               Clock,
	"earth":               Earth,
	"material":            Material,
	"moon":                Moon,
	"runner":              Runner,
	"pong":                Pong,
	"shark":               Shark,
	"dqpb":                Dqpb,
	"weather":             Weather,
	"christmas":           Christmas,
	"grenade":             Grenade,
	"point":               Point,
	"layer":               Layer,
	"betaWave":            BetaWave,
	"fingerDance":         FingerDance,
	"fistBump":            FistBump,
	"soccerHeader":        SoccerHeader,
	"mindblown":           Mindblown,
	"speaker":             Speaker,
	"orangePulse":         OrangePulse,
	"bluePulse":           BluePulse,
	"orangeBluePulse":     OrangeBluePulse,
	"timeTravel":          TimeTravel,
	"aesthetic":           Aesthetic,
	"dwarfFortress":       DwarfFortress,
}

Map contains all Spinner vars, with the key being the Spinner name. It allows an app to embed every Spinner, and let the user configure their favorite.

Slice contains all Spinner vars in order.

Functions

This section is empty.

Types

type Spinner

type Spinner struct {
	// Name is the spinner name
	Name string
	// Frames is a list of frames for a spinner.
	Frames []string
	// Interval is the recommended interval for a spinner.
	Interval time.Duration
}

Spinner defines a command-line spinner.

func Random added in v1.0.1

func Random() Spinner

Random returns a random spinner.

func (Spinner) Boomerang

func (s Spinner) Boomerang() Spinner

Boomerang returns a new Spinner that loops back and forth.

func (Spinner) Reverse

func (s Spinner) Reverse() Spinner

Reverse returns a new Spinner that plays backwards.

Directories

Path Synopsis
examples
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL