Documentation
¶
Index ¶
- Constants
- type Option
- type Options
- type SimpleSpinner
- func (s *SimpleSpinner) IsActive() bool
- func (s *SimpleSpinner) SetCharset(charset []string) Spinner
- func (s *SimpleSpinner) SetColor(color string) Spinner
- func (s *SimpleSpinner) SetPrefix(prefix string) Spinner
- func (s *SimpleSpinner) SetText(text string) Spinner
- func (s *SimpleSpinner) Start() Spinner
- func (s *SimpleSpinner) Stop() Spinner
- func (s *SimpleSpinner) Writer() io.Writer
- type Spinner
- type TermSpinner
- func (s *TermSpinner) IsActive() bool
- func (s *TermSpinner) SetCharset(charset []string) Spinner
- func (s *TermSpinner) SetColor(color string) Spinner
- func (s *TermSpinner) SetPrefix(text string) Spinner
- func (s *TermSpinner) SetText(text string) Spinner
- func (s *TermSpinner) Start() Spinner
- func (s *TermSpinner) Stop() Spinner
- func (s *TermSpinner) Writer() io.Writer
Constants ¶
const DefaultText = "Initializing..."
DefaultText defines the default spinner text.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
func WithCharset ¶
WithCharset configures the spinner charset.
func WithWriter ¶
WithWriter configures an output for a spinner.
type SimpleSpinner ¶
type SimpleSpinner struct {
// contains filtered or unexported fields
}
func (*SimpleSpinner) IsActive ¶
func (s *SimpleSpinner) IsActive() bool
IsActive returns whether the spinner is currently active.
func (*SimpleSpinner) SetCharset ¶
func (s *SimpleSpinner) SetCharset(charset []string) Spinner
SetCharset sets the charset for the spinner.
func (*SimpleSpinner) SetColor ¶
func (s *SimpleSpinner) SetColor(color string) Spinner
SetColor sets the color for the spinner (if color functionality is added).
func (*SimpleSpinner) SetPrefix ¶
func (s *SimpleSpinner) SetPrefix(prefix string) Spinner
SetPrefix sets the prefix for the spinner.
func (*SimpleSpinner) SetText ¶
func (s *SimpleSpinner) SetText(text string) Spinner
SetText sets the text for the spinner.
func (*SimpleSpinner) Start ¶
func (s *SimpleSpinner) Start() Spinner
Start begins the spinner animation.
func (*SimpleSpinner) Stop ¶
func (s *SimpleSpinner) Stop() Spinner
Stop ends the spinner animation.
func (*SimpleSpinner) Writer ¶
func (s *SimpleSpinner) Writer() io.Writer
Writer returns the spinner writer.
type Spinner ¶
type TermSpinner ¶
type TermSpinner struct {
// contains filtered or unexported fields
}
func (*TermSpinner) IsActive ¶
func (s *TermSpinner) IsActive() bool
IsActive returns whether the spinner is currently active.
func (*TermSpinner) SetCharset ¶
func (s *TermSpinner) SetCharset(charset []string) Spinner
SetCharset sets the prefix for spinner.
func (*TermSpinner) SetColor ¶
func (s *TermSpinner) SetColor(color string) Spinner
SetColor sets the prefix for spinner.
func (*TermSpinner) SetPrefix ¶
func (s *TermSpinner) SetPrefix(text string) Spinner
SetPrefix sets the prefix for spinner.
func (*TermSpinner) SetText ¶
func (s *TermSpinner) SetText(text string) Spinner
SetText sets the text for spinner.
func (*TermSpinner) Writer ¶
func (s *TermSpinner) Writer() io.Writer
Writer returns the spinner writer.