Help us shape the future of Go! Take the 2026 Go Developer Survey

prompt

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package prompt asks for the next turn once an answer is in.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Terminal

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

Terminal frames the input between two faint rules, prints "❯ " on stderr and waits for the next line typed. An empty line asks again. End of input, or ctx ending (Ctrl-C at the prompt), ends the session.

func NewTerminal

func NewTerminal(lines <-chan string, stderr io.Writer) Terminal

func (Terminal) Next

func (t Terminal) Next(ctx context.Context) (string, bool)

Next returns the next prompt, or false when the session is over.

Jump to

Keyboard shortcuts

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