feat(go): Add Go stdlib extraction tool for registry generation (PR-02)#548
Merged
shivasurya merged 1 commit intomainfrom Feb 25, 2026
Merged
feat(go): Add Go stdlib extraction tool for registry generation (PR-02)#548shivasurya merged 1 commit intomainfrom
shivasurya merged 1 commit intomainfrom
Conversation
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #548 +/- ##
==========================================
+ Coverage 82.64% 83.09% +0.45%
==========================================
Files 140 141 +1
Lines 17064 17531 +467
==========================================
+ Hits 14103 14568 +465
- Misses 2421 2422 +1
- Partials 540 541 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7 tasks
Owner
Author
This was referenced Feb 25, 2026
Owner
Author
Merge activity
|
- Add tools/internal/goextract package with Extractor struct for walking
GOROOT/src and extracting full API surface of stdlib packages
- Extract functions (with generics, variadic, methods), types (struct,
interface, alias), constants (iota detection), and variables
- Generate per-package JSON files ({pkg}_stdlib.json) and manifest.json
with SHA256 checksums and aggregate statistics
- Add CLI entry point tools/generate_go_stdlib_registry.go with
--go-version, --output-dir, and --goroot flags
- Achieve 100% test coverage with unit and integration tests (186 packages
extracted from Go 1.26 stdlib in integration test)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d0b0db7 to
10f5ae8
Compare
Code Pathfinder Security ScanNo security issues detected.
Powered by Code Pathfinder |
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
tools/internal/goextractpackage implementingExtractorfor walking$GOROOT/srcand extracting the full exported API surface of Go stdlib packages viago/parserandgo/ast{pkg}_stdlib.json) andmanifest.jsonwith SHA256 checksums and aggregate statistics (186 packages from Go 1.26 stdlib)tools/generate_go_stdlib_registry.gowith--go-version,--output-dir, and--gorootflagsTest plan
go build ./...passes with zero errorsgolangci-lint run ./...reports 0 issuesgo test ./tools/internal/goextract/— 100% coverage, all tests passfmt.Printlnvariadic,slices.Sortgeneric,os.Stdinvariablego test ./...— all 29 packages passimport_path,is_variadic,is_generic, etc.) matching core types from PR-01🤖 Generated with Claude Code