Documentation
¶
Index ¶
- type InputRequest
- type Terminal
- func (t *Terminal) AskYesNo(prompt string) bool
- func (t *Terminal) Close()
- func (t *Terminal) PrintMessage(message string, restorePrompt bool)
- func (t *Terminal) ReadLine() (string, error)
- func (t *Terminal) ReadLineWithPrompt(prompt string) (string, error)
- func (t *Terminal) RestoreState() error
- func (t *Terminal) SetPrompt(prompt string)
- func (t *Terminal) SetRawMode() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InputRequest ¶
InputRequest represents a request for user input.
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal struct handles user input and terminal state
func NewTerminal ¶
NewTerminal initializes a new Terminal instance.
func (*Terminal) AskYesNo ¶
AskYesNo prompts the user with a question and expects a yes/no response.
func (*Terminal) Close ¶
func (t *Terminal) Close()
Close terminates the input manager goroutine and restores terminal state.
func (*Terminal) PrintMessage ¶
PrintMessage prints a message to the terminal in a thread-safe manner.
func (*Terminal) ReadLineWithPrompt ¶
ReadLineWithPrompt reads a line using a specified prompt.
func (*Terminal) RestoreState ¶
func (*Terminal) SetRawMode ¶
Click to show internal directories.
Click to hide internal directories.