diff options
| -rw-r--r-- | internal/utils/progress.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/utils/progress.go b/internal/utils/progress.go new file mode 100644 index 00000000..f97dedc6 --- /dev/null +++ b/internal/utils/progress.go @@ -0,0 +1,18 @@ +// Package utils provides misc utilities. +package utils + +import ( + "fmt" + "io" +) + +// WriteProgressf writes one formatted progress message to w. +// +// It is nil-safe and ignores write errors by design. +func WriteProgressf(w io.Writer, format string, args ...any) { + if w == nil { + return + } + + _, _ = fmt.Fprintf(w, format, args...) +} |
