Conversation
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.
Transform the manifest parser from a parsing-only library into a full-featured project with a download engine, CLI tool, GoReleaser, and comprehensive documentation.
Changes
Download Engine (downloader/)
New sub-package so both CLI and library users can download game files. Includes a ProgressReporter interface with a no-op implementation for library users, a VerifyInstallation() function that checks file existence, size, and SHA1 hash
against a manifest, and a full download orchestrator with worker pool concurrency, chunk deduplication, retry with exponential backoff (capped at 30s), disk-based chunk cache for resume, SHA1 verification, atomic writes via temp files, context cancellation, tag-based file filtering, dry-run mode, and automatic cache cleanup after assembly. Covered by 16 tests across downloader and verifier.
CLI (cmd/manifest/)
Built with cobra and progressbar/v3, only imported from cmd/ so library users don't pull these dependencies. Commands: info for displaying metadata and sizes, list for file listing with tag/sort/filter/long flags, download with progress bar and flags for base URL, concurrency, retries, verify, resume, tags, and dry-run, verify for checking installed files against a manifest, delta for comparing two manifests with optional JSON output, chunks for listing chunk info, and export for JSON or CSV output.
GoReleaser + CI
Added .goreleaser.yaml for multi-platform static binaries (linux/darwin/windows, amd64/arm64) with ldflags for version injection. Added .github/workflows/release.yml triggered on version tags using goreleaser-action. Updated CI workflow to include a CLI build step.
Documentation
Added doc.go with package-level GoDoc. Complete rewrite of README.md with badges, feature list, CLI installation and usage for all commands, and low-level library examples covering parsing, metadata inspection, file and chunk iteration, chunk parts, custom fields, single chunk download and decompression, manual file assembly, the high-level downloader, delta patching, and verification. Includes CDN base URL performance table.