mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Use errcheck to find unhandled errors (#795)
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
@@ -17,7 +17,7 @@ func Log(msg string) {
|
||||
if err != nil {
|
||||
log.Fatalf("error opening file: %v", err)
|
||||
}
|
||||
defer f.Close()
|
||||
defer func() { _ = f.Close() }()
|
||||
|
||||
log.SetOutput(f)
|
||||
log.Println(msg)
|
||||
|
||||
Reference in New Issue
Block a user