Skip to content

Conversation

@zhubert
Copy link
Owner

@zhubert zhubert commented Jan 26, 2026

Summary

Changes GetLogFiles to explicitly initialize an empty slice instead of using a nil slice declaration, ensuring consistent return behavior.

Changes

  • Replace var files []LogFile with files := []LogFile{} for explicit empty slice initialization
  • Add documentation clarifying that the function always returns a non-nil slice

Test plan

  • Run go test ./internal/ui/... to verify existing tests pass
  • Verify that callers of GetLogFiles handle the return value correctly (no nil checks needed)

Ensures the function never returns nil, making the API more predictable for callers who can safely iterate without nil checks.
@github-actions
Copy link

🔍 Deadcode Analysis

✅ No unreachable functions detected. Nice work keeping the codebase clean!

@zhubert zhubert enabled auto-merge (squash) January 26, 2026 20:20
@zhubert zhubert merged commit 074b69a into main Jan 26, 2026
2 checks passed
@zhubert zhubert deleted the test-failing branch January 26, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants