Documentation
¶
Overview ¶
Package steps shows a task as a list of steps the way `docker buildx` does: the running step streams its output in a small scrolling window, and folds to one line with its duration when it finishes.
On a terminal the view is redrawn in place. Finished steps are printed once above the live area and never redrawn. Off a terminal, every line is printed once, prefixed with its step.
Index ¶
Constants ¶
const DefaultLines = 12
DefaultLines is the height of a running step's log window.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
TTY bool // redraw in place
Color bool
Lines int // log window height; DefaultLines if 0
Verbose bool // print every line of finished steps, not just their summary
}
Options configure a View.
type Step ¶
type Step struct {
// contains filtered or unexported fields
}
Step is one step of a View. Its Write method takes the step's output; complete lines go into its log, escape sequences stripped.
type View ¶
type View struct {
// contains filtered or unexported fields
}
View is a list of steps.
func (*View) Close ¶
func (v *View) Close()
Close draws the final state and stops redrawing. A step still running is shown as stopped; pending steps are dropped.