Skip to content

refactor: replace interface{} with typed CaptureResults in snapshot capture#108

Merged
fullstackjam merged 1 commit into
mainfrom
refactor/snapshot-typed-capture-results
May 27, 2026
Merged

refactor: replace interface{} with typed CaptureResults in snapshot capture#108
fullstackjam merged 1 commit into
mainfrom
refactor/snapshot-typed-capture-results

Conversation

@fullstackjam

Copy link
Copy Markdown
Collaborator

Summary

  • Replace []interface{} + unsafe type assertions in snapshot/capture.go with a typed CaptureResults struct
  • Each capture step now populates a named field (Formulae, Casks, Git, etc.) instead of appending to an untyped slice
  • Eliminates silent zero-value bugs if capture step ordering ever changes

Test plan

  • go vet ./internal/snapshot/... passes
  • go test ./internal/snapshot/... passes
  • go test ./internal/archtest/... passes (no new violations)

@github-actions github-actions Bot added tests Tests only snapshot Snapshot capture/restore labels May 26, 2026
@fullstackjam fullstackjam merged commit a68ec8f into main May 27, 2026
12 checks passed
@fullstackjam fullstackjam deleted the refactor/snapshot-typed-capture-results branch May 27, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot Snapshot capture/restore tests Tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant