blob: 2adcb26ab18dd273a40e0483d5afc97b6b1a8ded (
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"
)
// BestEffortFprintf writes one formatted message to w.
//
// It is nil-safe and ignores write errors by design.
func BestEffortFprintf(w io.Writer, format string, args ...any) {
if w == nil {
return
}
_, _ = fmt.Fprintf(w, format, args...)
}
|