aboutsummaryrefslogtreecommitdiff
path: root/internal/utils/progress.go
blob: f97dedc661bb5106a4ef2ae5c277eaa936d825d2 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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...)
}