spinner

package
v0.8.0-beta.37 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Start()
	Done(status string)
	Success()
	Fail()
	SetMessage(msg string)
	SetFinalMsg(msg string)
	// contains filtered or unexported methods
}

func New

func New(w io.Writer, opts ...Option) Interface

type Option

type Option func(Interface)

func WithMessage

func WithMessage(msg string) Option

type Spinner

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

func (*Spinner) Done

func (s *Spinner) Done(status string)

func (*Spinner) Fail

func (s *Spinner) Fail()

func (*Spinner) SetFinalMsg

func (s *Spinner) SetFinalMsg(msg string)

func (*Spinner) SetMessage

func (s *Spinner) SetMessage(msg string)

func (*Spinner) Start

func (s *Spinner) Start()

func (*Spinner) Success

func (s *Spinner) Success()

type WindowsSpinner

type WindowsSpinner struct {
	FinalMSG string

	Writer io.Writer
	// contains filtered or unexported fields
}

func NewWindowsSpinner

func NewWindowsSpinner(w io.Writer, opts ...Option) *WindowsSpinner

func (*WindowsSpinner) Done

func (s *WindowsSpinner) Done(status string)

func (*WindowsSpinner) Fail

func (s *WindowsSpinner) Fail()

func (*WindowsSpinner) SetFinalMsg

func (s *WindowsSpinner) SetFinalMsg(msg string)

func (*WindowsSpinner) SetMessage

func (s *WindowsSpinner) SetMessage(msg string)

func (*WindowsSpinner) Start

func (s *WindowsSpinner) Start()

func (*WindowsSpinner) Success

func (s *WindowsSpinner) Success()

Jump to

Keyboard shortcuts

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