Skip to content

implement gopkg: search, versions, latest, hash - #1

Merged
tamnd merged 1 commit into
mainfrom
feat/v0.1.0
Jun 13, 2026
Merged

tamnd merged 1 commit into
mainfrom
feat/v0.1.0

Conversation

@tamnd

@tamnd tamnd commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • pkggodev/ client with Config-based construction, pacing, retry, HTML tokenizer for pkg.go.dev search, GOPROXY version list and @latest JSON, sum.golang.org hash lookup
  • cli/ cobra command tree: search, versions, latest, hash, version
  • pkg/render/ reflection-based output renderer: table, json, jsonl, csv, tsv, url, raw
  • 9 httptest-based unit tests, no network in suite

Test plan

  • go test ./... passes
  • gopkg search "http server" -n 3 -o table returns 3 rows with version and published date
  • gopkg versions github.com/spf13/cobra -n 5 -o table returns 5 rows sorted newest first
  • gopkg latest github.com/spf13/cobra returns one row with version and time
  • gopkg hash github.com/spf13/cobra@v1.8.0 returns one row with non-empty hash fields
  • gopkg version prints version/commit/date

Reads pkg.go.dev search results (HTML), proxy.golang.org version lists
and @latest JSON, and sum.golang.org hash records. No API key needed.

- pkggodev/ client with pacing and retry; HTML tokenizer for search
- cli/ cobra tree: search, versions, latest, hash, version
- pkg/render reflection-based table/json/jsonl/csv/tsv/url/raw output
- 9 httptest-based tests, 0 network calls in suite
@tamnd
tamnd merged commit d6e1deb into main Jun 13, 2026
7 of 8 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