fix(slides): snake_case output keys, explicit file close, validate size early#129
Merged
fix(slides): snake_case output keys, explicit file close, validate size early#129
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Post-merge review fixes for PR #107 (slides thumbnails). Addresses issues found by both PR-reviewer and Codex:
contentUrl→content_urlandsavedTo→saved_toto match the project's snake_case convention used by all other commands.defer f.Close()with explicitf.Close()+ error check, ensuring file flush errors are surfaced to the caller.Presentations.GetAPI call to avoid an unnecessary round-trip when the size is invalid.Test plan
go vet ./...cleango test ./...all passgws slides thumbnail <id> --slide 1 --download thumb.png🤖 Generated with Claude Code