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.
Click to show internal directories.
Click to hide internal directories.