Repository navigation
implement gopkg: search, versions, latest, hash - #1
Merged
Merged
Conversation
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
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
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 lookupcli/cobra command tree:search,versions,latest,hash,versionpkg/render/reflection-based output renderer: table, json, jsonl, csv, tsv, url, rawTest plan
go test ./...passesgopkg search "http server" -n 3 -o tablereturns 3 rows with version and published dategopkg versions github.com/spf13/cobra -n 5 -o tablereturns 5 rows sorted newest firstgopkg latest github.com/spf13/cobrareturns one row with version and timegopkg hash github.com/spf13/cobra@v1.8.0returns one row with non-empty hash fieldsgopkg versionprints version/commit/date