io

package
v3.0.0-beta.20240510 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasDataAvailable

func HasDataAvailable(reader io.Reader) bool

HasDataAvailable will return whether the given Reader has data available to read

Types

type Pending

type Pending struct {
	Err error
	// contains filtered or unexported fields
}

Pending is used to show a loading spinner while a long running function runs to perform some action and output information

func NewPendingCommand

func NewPendingCommand(fn tea.Cmd, loadingText string) Pending

NewPendingCommand is used to show a loading spinner while a long running function runs to perform some action and output information. fn is a function run to perform the action. It should return a PendingOutput if to update the output after the action is complete. It can also return an error instance. loadingText is the text shown while the function is running

func (Pending) Init

func (p Pending) Init() tea.Cmd

Init implements tea.Model.

func (Pending) Update

func (p Pending) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (Pending) View

func (p Pending) View() string

View implements tea.Model.

type PendingOutput

type PendingOutput string

Jump to

Keyboard shortcuts

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