Skip to content

fix(slides): snake_case output keys, explicit file close, validate size early#129

Merged
omriariav merged 2 commits intomainfrom
fix/slides-review-fixes
Feb 19, 2026
Merged

fix(slides): snake_case output keys, explicit file close, validate size early#129
omriariav merged 2 commits intomainfrom
fix/slides-review-fixes

Conversation

@omriariav
Copy link
Owner

Summary

Post-merge review fixes for PR #107 (slides thumbnails). Addresses issues found by both PR-reviewer and Codex:

  • snake_case output keys: Rename contentUrlcontent_url and savedTosaved_to to match the project's snake_case convention used by all other commands.
  • Explicit file close: Replace defer f.Close() with explicit f.Close() + error check, ensuring file flush errors are surfaced to the caller.
  • Validate size early: Move size validation before the Presentations.Get API call to avoid an unnecessary round-trip when the size is invalid.

Test plan

  • go vet ./... clean
  • go test ./... all pass
  • Manual test: gws slides thumbnail <id> --slide 1 --download thumb.png

🤖 Generated with Claude Code

omriariav and others added 2 commits February 19, 2026 23:43
…ze early

- Rename output keys from camelCase to snake_case: contentUrl → content_url,
  savedTo → saved_to, matching project convention used by all other commands.
- Replace defer f.Close() with explicit close + error check before returning,
  ensuring file flush errors are surfaced to the caller.
- Move size validation before the Presentations.Get API call to avoid an
  unnecessary round-trip when the size is invalid.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Consistent with the file handle fix in this same PR — close the HTTP
response body explicitly on each return path instead of deferring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@omriariav omriariav merged commit c5fddf7 into main Feb 19, 2026
1 check passed
@omriariav omriariav deleted the fix/slides-review-fixes branch February 19, 2026 21:51
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.

1 participant

Comments