Fix remaining errcheck warnings in daemon.go, daemon_lock.go, delete.go
- daemon.go: fix os.Remove() in stopDaemon (line 602) - daemon_lock.go: fix f.Close() and fmt.Fprintf() calls - delete.go: fix cmd.Usage(), out.Close(), and os.Remove() calls All error returns now properly handled or explicitly ignored. Amp-Thread-ID: https://ampcode.com/threads/T-56b6d9f4-16a4-4c50-b7b9-dde1c3774650 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -599,7 +599,7 @@ func stopDaemon(pidFile string) {
|
||||
fmt.Fprintf(os.Stderr, "Error killing process: %v\n", err)
|
||||
}
|
||||
}
|
||||
os.Remove(pidFile)
|
||||
_ = os.Remove(pidFile)
|
||||
fmt.Println("Daemon killed")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user