Fast implementation of Git in pure Go
at master 18 lines 331 B view raw
1// Package utils provides misc utilities. 2package utils 3 4import ( 5 "fmt" 6 "io" 7) 8 9// BestEffortFprintf writes one formatted message to w. 10// 11// It is nil-safe and ignores write errors by design. 12func BestEffortFprintf(w io.Writer, format string, args ...any) { 13 if w == nil { 14 return 15 } 16 17 _, _ = fmt.Fprintf(w, format, args...) 18}