Fix lint errors: handle errors, use fmt.Fprintf, apply De Morgan's law, use switch statements

Amp-Thread-ID: https://ampcode.com/threads/T-afcf56b0-a8bc-4310-bb59-1b63e1d70c89
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-24 12:27:02 -07:00
parent 1d5e89b9bb
commit 9dcb86ebfb
17 changed files with 342 additions and 537 deletions

View File

@@ -63,7 +63,9 @@ func TestLibraryIntegration(t *testing.T) {
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
}
store.CreateIssue(ctx, issue, "test-actor")
if err := store.CreateIssue(ctx, issue, "test-actor"); err != nil {
t.Fatalf("CreateIssue failed: %v", err)
}
// Get it back
retrieved, err := store.GetIssue(ctx, issue.ID)
@@ -89,7 +91,9 @@ func TestLibraryIntegration(t *testing.T) {
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
}
store.CreateIssue(ctx, issue, "test-actor")
if err := store.CreateIssue(ctx, issue, "test-actor"); err != nil {
t.Fatalf("CreateIssue failed: %v", err)
}
// Update status
updates := map[string]interface{}{
@@ -131,8 +135,12 @@ func TestLibraryIntegration(t *testing.T) {
UpdatedAt: time.Now(),
}
store.CreateIssue(ctx, issue1, "test-actor")
store.CreateIssue(ctx, issue2, "test-actor")
if err := store.CreateIssue(ctx, issue1, "test-actor"); err != nil {
t.Fatalf("CreateIssue failed: %v", err)
}
if err := store.CreateIssue(ctx, issue2, "test-actor"); err != nil {
t.Fatalf("CreateIssue failed: %v", err)
}
// Add dependency: issue2 blocks issue1
dep := &beads.Dependency{