spinner

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package spinner provides a frame-based textual spinner.

Index

Constants

This section is empty.

Variables

View Source
var DefaultFrames = []string{
	"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏",
}

DefaultFrames is the default set of frames used.

View Source
var DefaultInterval = time.Millisecond * 75

DefaultInterval is the default animation interval used.

Functions

func View

func View(m Model) string

View function.

Types

type Model

type Model struct {
	// Frames is a set of frames to animation. Defaults to DefaultFrames.
	Frames []string

	// Interval is the animation update interval. Defaults to DefaultInterval.
	Interval time.Duration
	// contains filtered or unexported fields
}

Model is the input model.

func Update

func Update(msg tea.Msg, m Model) (Model, tea.Cmd)

Update function.

type Msg added in v0.5.2

type Msg int

Msg is a spinner message.

const (
	Tick Msg = iota
)

Messages supported.

Jump to

Keyboard shortcuts

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