task

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Unlicense Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v1.6.0

type Option func(*Task)

func WithNoOutput added in v1.6.0

func WithNoOutput() Option

type Task

type Task struct {
	// contains filtered or unexported fields
}

func New

func New(category string, description string, f func(t *Task) error, opts ...Option) *Task

New creates a new task.

func (*Task) Run

func (t *Task) Run() error

Run runs the task, providing animated output as it does so. If the task fails, the error from the task function will be returned here.

func (*Task) Skip

func (t *Task) Skip()

func (*Task) StopAnimation

func (t *Task) StopAnimation()

Jump to

Keyboard shortcuts

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