lint: ensure errors are at least logged (errcheck)

Signed-off-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Moritz Poldrack 2022-07-29 22:31:54 +02:00 committed by Robin Jarry
parent a8d631177f
commit 5ca6022d00
33 changed files with 301 additions and 103 deletions

View file

@ -42,7 +42,7 @@ func PanicHandler() {
fmt.Fprintln(panicLog, strings.Repeat("#", 80))
fmt.Fprintf(outputs, "%s\n", panicMessage)
fmt.Fprintf(panicLog, "Error: %v\n\n", r)
panicLog.Write(debug.Stack())
panicLog.Write(debug.Stack()) //nolint:errcheck // we are already in a panic, so not much we can do here
fmt.Fprintf(os.Stderr, "\nThis error was also written to: %s\n", filename)
panic(r)
}