Documentation ¶
Overview ¶
Package program wraps the initial interaction with the end user, before (if ever) the control is passed to the tea.Program.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Program)
Option is a function that can be passed to WithOptions.
func WithBuildInfo ¶
WithBuildInfo sets the version information of this program.
func WithFlagSet ¶
WithFlagSet is an optional way to set the flag set for the program. Useful in tests.
func WithGoModInfo ¶ added in v0.4.1
func WithGoModInfo() Option
WithGoModInfo reads build info and sets its fields, if its available.
func WithInput ¶ added in v0.3.0
WithInput sets the stdin for the program. This should be used for testing the features that read from stdin.
func WithOutput ¶
WithOutput sets the stdout writer for the program. This should be used for testing some of the basic outputs (non-interactive).