progress

package
v1.9.8 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FinishStage

func FinishStage(title string, quiet bool, state *StageState, err error)

FinishStage renders the footer and any error detail lines.

func ItemFromError

func ItemFromError(err error) string

ItemFromError extracts the first file-like item from an error for progress display.

Types

type Message

type Message struct {
	Type  Type
	Value string
}

Message represents a message sent through the progress channel

func NewDebug

func NewDebug(debug string) Message

NewDebug creates a new debug information progress message

func NewFile

func NewFile(file string) Message

NewFile creates a new file generation progress message

type StageState

type StageState struct {
	// contains filtered or unexported fields
}

StageState tracks the console state for a progress stage.

func ConsumeStage

func ConsumeStage(progressChan <-chan Message, done <-chan struct{}, title string, quiet, headerShown bool) StageState

ConsumeStage renders progress messages until done.

type Type

type Type int

Type represents the type of progress message

const (
	// TypeFile indicates a file is being generated
	TypeFile Type = iota

	// TypeDebug indicates debug information
	TypeDebug

	// TypeError indicates an error occurred with a file
	TypeError
)

Jump to

Keyboard shortcuts

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