spinner

package
v13.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package spinner provides methods for creating spinner animation for long-running tasks

Index

Examples

Constants

This section is empty.

Variables

View Source
var DisableAnimation = false

DisableAnimation is global animation off switch flag

View Source
var ErrColorTag = "{r}"

ErrColorTag is cross color tag (see fmtc package)

View Source
var ErrSymbol = "✖ "

ErrSymbol contains symbol for action with problems

View Source
var OkColorTag = "{g}"

OkColorTag is check color tag (see fmtc package)

View Source
var OkSymbol = "✔ "

OkSymbol contains symbol for action with no problems

View Source
var SkipColorTag = "{s-}"

SkipColorTag is skipped action color tag (see fmtc package)

View Source
var SkipSymbol = "✔ "

SkipSymbol contains symbol for skipped action

View Source
var SpinnerColorTag = "{y}"

SpinnerColorTag is spinner animation color tag (see fmtc package)

View Source
var TimeColorTag = "{s-}"

TimeColorTag is time color tag (see fmtc package)

Functions

func Done

func Done(ok bool)

Done finishes spinner animation and shows task status

Example
Output:

func Show

func Show(message string, args ...any)

Show shows spinner with given task description

Example
Output:

func Skip

func Skip()

Skip finishes spinner animation and mark it as skipped

Example
Output:

func Update

func Update(message string, args ...any)

Update updates task description

Example
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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