listener

package
v0.0.0-...-2510b82 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package listener provides input listening functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputCommand

type InputCommand struct {
	Args []string
}

InputCommand defines a command input received by the listener.

type Listener

type Listener interface {
	Listen() (cmds []InputCommand, ok bool)
}

Listener defines an interface that can listen for incoming commands.

type TextListener

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

TextListener listens for incoming text commands.

func NewText

func NewText(ui indicator, input inputter) TextListener

NewText initializes and returns a new TextListener type.

func (TextListener) Listen

func (t TextListener) Listen() ([]InputCommand, bool)

Listen prompts and waits for user input on Stdin.

Jump to

Keyboard shortcuts

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