Files
BrowserOS/packages/browseros/tools/patch/internal/engine/progress.go
Nikhil e7105ae50b fix: improve browseros-patch workspace feedback (#921)
* fix: make patch list registry-only

* feat: add patch command progress logs

* fix: address review feedback for PR #921
2026-05-02 15:09:31 -07:00

23 lines
460 B
Go

package engine
import "fmt"
// Progress receives concise updates for operations that can take noticeable time.
type Progress interface {
Step(message string)
}
type ProgressFunc func(message string)
// Step sends one progress message through f.
func (f ProgressFunc) Step(message string) {
f(message)
}
func reportProgress(progress Progress, format string, args ...any) {
if progress == nil {
return
}
progress.Step(fmt.Sprintf(format, args...))
}