Documentation
¶
Overview ¶
Package plain provides a line-based backend for interact/ui.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct{}
Backend is a simple line-based backend that works with ordinary IO streams.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session implements backend.Session with line-based input.
func (*Session) ReadEvent ¶
ReadEvent reads one line and normalizes it as an enter event.
The read is started on demand: at most one line read is in flight per session, so a cancelled call neither consumes a line a later call needs nor leaves a second reader on the same stream. A read that is still waiting for input when ctx is cancelled is kept and resumed by the next call.
Click to show internal directories.
Click to hide internal directories.