mirror of
https://github.com/restic/restic.git
synced 2026-05-18 16:15:25 +00:00
improve fprintf related error handling
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user