fix: resolve staticcheck nil pointer dereference warning
Use t.Fatal instead of t.Error when retrieved session is nil to prevent subsequent nil pointer dereference on retrieved.ID. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -85,7 +85,7 @@ func TestSessionStoreCreate(t *testing.T) {
|
||||
// Verify we can retrieve it
|
||||
retrieved := store.Get(session.ID)
|
||||
if retrieved == nil {
|
||||
t.Error("Should be able to retrieve created session")
|
||||
t.Fatal("Should be able to retrieve created session")
|
||||
}
|
||||
if retrieved.ID != session.ID {
|
||||
t.Error("Retrieved session ID should match")
|
||||
|
||||
Reference in New Issue
Block a user