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 ¶ added in v28.8.1
WithCharset configures the spinner charset.
func WithWriter ¶
WithWriter configures an output for a spinner.
type SimpleSpinner ¶ added in v28.8.1
type SimpleSpinner struct {
// contains filtered or unexported fields
}
func (*SimpleSpinner) IsActive ¶ added in v28.8.1
func (s *SimpleSpinner) IsActive() bool
IsActive returns whether the spinner is currently active.
func (*SimpleSpinner) SetCharset ¶ added in v28.8.1
func (s *SimpleSpinner) SetCharset(charset []string) Spinner
SetCharset sets the charset for the spinner.
func (*SimpleSpinner) SetColor ¶ added in v28.8.1
func (s *SimpleSpinner) SetColor(color string) Spinner
SetColor sets the color for the spinner (if color functionality is added).
func (*SimpleSpinner) SetPrefix ¶ added in v28.8.1
func (s *SimpleSpinner) SetPrefix(prefix string) Spinner
SetPrefix sets the prefix for the spinner.
func (*SimpleSpinner) SetText ¶ added in v28.8.1
func (s *SimpleSpinner) SetText(text string) Spinner
SetText sets the text for the spinner.
func (*SimpleSpinner) Start ¶ added in v28.8.1
func (s *SimpleSpinner) Start() Spinner
Start begins the spinner animation.
func (*SimpleSpinner) Stop ¶ added in v28.8.1
func (s *SimpleSpinner) Stop() Spinner
Stop ends the spinner animation.
func (*SimpleSpinner) Writer ¶ added in v28.8.1
func (s *SimpleSpinner) Writer() io.Writer
Writer returns the spinner writer.
type Spinner ¶
type TermSpinner ¶ added in v28.8.1
type TermSpinner struct {
// contains filtered or unexported fields
}
func (*TermSpinner) IsActive ¶ added in v28.8.1
func (s *TermSpinner) IsActive() bool
IsActive returns whether the spinner is currently active.
func (*TermSpinner) SetCharset ¶ added in v28.8.1
func (s *TermSpinner) SetCharset(charset []string) Spinner
SetCharset sets the prefix for spinner.
func (*TermSpinner) SetColor ¶ added in v28.8.1
func (s *TermSpinner) SetColor(color string) Spinner
SetColor sets the prefix for spinner.
func (*TermSpinner) SetPrefix ¶ added in v28.8.1
func (s *TermSpinner) SetPrefix(text string) Spinner
SetPrefix sets the prefix for spinner.
func (*TermSpinner) SetText ¶ added in v28.8.1
func (s *TermSpinner) SetText(text string) Spinner
SetText sets the text for spinner.
func (*TermSpinner) Start ¶ added in v28.8.1
func (s *TermSpinner) Start() Spinner
Start starts spinning.
func (*TermSpinner) Stop ¶ added in v28.8.1
func (s *TermSpinner) Stop() Spinner
Stop stops spinning.
func (*TermSpinner) Writer ¶ added in v28.8.1
func (s *TermSpinner) Writer() io.Writer
Writer returns the spinner writer.