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:
parent
a8d631177f
commit
5ca6022d00
33 changed files with 301 additions and 103 deletions
logging
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue