form

command
v0.0.0-...-0f1ffb3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Command form asks four questions, on a screen or in words.

A form is a container with two things added: an answer checked when the keyboard leaves a field, and the set checked on submission. The four fields are the four anything ever asks for — a line of text, one choice, several, and a yes or no — and each of them writes into a variable of this program's own.

The second half is the point of the example. Run it with its output going somewhere that is not a terminal:

go run ./form | cat

and the same form is asked one question at a time, in words. The questions are the fields' own, so nothing is described twice.

Jump to

Keyboard shortcuts

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