steps

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package steps provides a way to run a function with a pretty loading spinner animation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunStepsWithSpinner

func RunStepsWithSpinner(
	ctx context.Context,
	steps []Step,
	out io.Writer,
) error

RunStepsWithSpinner runs a list of steps with a loading spinner animation.

Types

type Step

type Step struct {
	// Desc is a human readable description of the step.
	Desc string
	// F is the function that will be called to execute the step.
	F func(ctx context.Context) error
}

Step provides a way to run a function with a pretty loading spinner animation.

Jump to

Keyboard shortcuts

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