improve fprintf related error handling

This commit is contained in:
Michael Eischer committed 2024-11-01 17:07:43 +01:00
1 parent 41fa41b28b
commit 569a117a1d
10 files changed
+43 -33

No files matched your search

+1 -1
View File
@@ -120,7 +120,7 @@ func goroutineNum() int {
runtime.Stack(b, false)
var num int
fmt.Sscanf(string(b), "goroutine %d ", &num)
_, _ = fmt.Sscanf(string(b), "goroutine %d ", &num)
return num
}
+1 -1
View File
@@ -42,7 +42,7 @@ func (rd *eofDetectReader) Close() error {
msg += fmt.Sprintf(", body: %q", buf)
}
fmt.Fprintln(os.Stderr, msg)
_, _ = fmt.Fprintln(os.Stderr, msg)
Log("%s: %+v", msg, errors.New("Close()"))
}
return rd.rd.Close()