spinner

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(d time.Duration, opts ...Option) func()

Start run spinner with the supplied options.

Types

type Option added in v0.7.0

type Option func(*options)

Option is a function that takes a spinner and applies a given configuration.

func WithColor added in v0.7.0

func WithColor(color string) Option

WithColor adds the given color to the spinner.

func WithCustomSet added in v0.7.0

func WithCustomSet(set []string) Option

WithCustomSet adds the given custom charsets the spinner.

func WithFinalMSG added in v0.7.0

func WithFinalMSG(msg string) Option

WithFinalMSG adds the given string ot the spinner as the final message to be written.

func WithHiddenCursor added in v0.7.0

func WithHiddenCursor(hide bool) Option

WithHiddenCursor hides the cursor if hideCursor = true given.

func WithPredefinedSet added in v0.7.0

func WithPredefinedSet(n int) Option

WithPredefinedSet adds the given predefined charsets the spinner. https://github.com/briandowns/spinner#available-character-sets

func WithSuffix added in v0.7.0

func WithSuffix(suffix string) Option

WithSuffix adds the given string to the spinner as the suffix.

func WithWriter added in v0.7.0

func WithWriter(w io.Writer) Option

WithWriter adds the given writer to the spinner. This function should be favored over directly assigning to the struct value.

Jump to

Keyboard shortcuts

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