v0.x: Props.IO, and the setup wizards' test seams¶
Spec 0198, landing in phases. This note grows with them.
Phase 1: the streams on Props¶
Props.IO(props.IOinterface,props.StdIOdefault) is the invocation's stdin, stdout and stderr, and whether a person is at them. A nil field reads as the process's streams throughGetIO(); nothing changes for a tool that never sets it. The root fills it from cobra in its pre-run.--accessible/GTB_ACCESSIBLE=trueon every GTB-based tool asks for line prompts (huh's accessible mode) instead of a full-screen form.setup.RunForm(ctx, p, form)is how a framework form runs: on the IO's streams, with the IO's accessible decision, refusing a stdin that is neither a terminal nor accessible (setup.ErrNonInteractive).- Tests drive real forms through
Props.IOwithinternal/formtest; see the testing guide. The form-creator options come out in phase 2.