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:
Steve Yegge
2025-10-24 11:17:11 -07:00
parent beb5dd91bf
commit 09b54d1b22
3 changed files with 7 additions and 7 deletions

View File

@@ -70,7 +70,7 @@ Force: Delete and orphan dependents
if len(issueIDs) == 0 {
fmt.Fprintf(os.Stderr, "Error: no issue IDs provided\n")
cmd.Usage()
_ = cmd.Usage()
os.Exit(1)
}
@@ -353,8 +353,8 @@ func removeIssueFromJSONL(issueID string) error {
enc := json.NewEncoder(out)
for _, iss := range issues {
if err := enc.Encode(iss); err != nil {
out.Close()
os.Remove(temp)
_ = out.Close()
_ = os.Remove(temp)
return fmt.Errorf("failed to write issue: %w", err)
}
}