Skip to content

Add --output=json support to get command - #277

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
get-json-output
Jun 24, 2026
Merged

Add --output=json support to get command#277
AndreyVMarkelov merged 1 commit into
masterfrom
get-json-output

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Refactors get command to support structured JSON output via --output=json
  • Downloads report per-file results with status (downloaded, created, existing) and kind (file, folder)
  • Recursive folder downloads include directory results in the results array
  • Stdout target (-) correctly rejected with --output=json since stdout is reserved for JSON
  • Updates README with get JSON example and migrated command list

Test plan

  • All existing tests pass
  • New JSON tests cover: single file download, recursive folder download, stdout target rejection, text mode silent
  • gofmt, go vet, golangci-lint clean

Refactor get command to support structured JSON output for scripting.
Downloads report per-file results with status (downloaded/created/existing)
and kind (file/folder). Recursive folder downloads include directory results.
Stdout target (-) correctly rejected with --output=json.
@AndreyVMarkelov
AndreyVMarkelov merged commit a68341c into master Jun 24, 2026
7 checks passed
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