display

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package display prints and receives input from the console.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action

func Action(t testing.TB, action string)

Action displays the specified action message. If t is not nil, the message is associated with the current test case.

func Banner(t testing.TB, lines ...string)

Banner displays a banner message with the specified lines. If t is not nil, the message is associated with the current test case.

func Menu(msg string, options ...string) int

Menu displays a menu with the specified message and list of options and returns the 1-indexed option number that the user selected.

func ReadLine

func ReadLine() string

ReadLine reads a line of user input. Exits fatally if the reader has not been started.

func ReaderStarted

func ReaderStarted() bool

ReaderStarted returns whether or not the reader has started.

func StartReader

func StartReader() error

StartReader starts a stdin reader.

func StopReader

func StopReader() error

StopReader stops the reader. Noop if it hasn't started.

Types

This section is empty.

Jump to

Keyboard shortcuts

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