Skip to content

feat(go): Add Go stdlib registry data structures and types (PR-01) - #546

Merged
shivasurya merged 1 commit into
mainfrom
shiva/go-stdlib-support-pr01
Feb 25, 2026
Merged

shivasurya merged 1 commit into
mainfrom
shiva/go-stdlib-support-pr01

Conversation

@shivasurya

Copy link
Copy Markdown
Owner

Summary

Introduce all data structures and type definitions required for Go standard library registry support (PR-01 of the Go stdlib support series).

  • Add go_stdlib_types.go with 13 typed structs covering the full Go stdlib registry schema: GoStdlibRegistry, GoManifest, GoVersionInfo, GoPackageEntry, GoRegistryStats, GoStdlibPackage, GoStdlibFunction, GoFunctionParam, GoReturnValue, GoTypeParam, GoStdlibType, GoStructField, GoStdlibConstant, GoStdlibVariable
  • Add GoCallEdge struct to types.go with IsStdlib bool and Confidence float32 fields for call resolution metadata
  • Add GoStdlibLoader interface to types.go to decouple core from the registry package (avoids import cycles)
  • Add StdlibLoader GoStdlibLoader field to GoModuleRegistry for lazy stdlib metadata attachment
  • All JSON tags use snake_case matching the Go stdlib CDN registry format
  • All structs include constructor functions and helper methods (GetPackage, GetFunction, GetType, GetConstant, GetVariable, HasPackage, PackageCount, etc.)

Test plan

  • go test ./graph/callgraph/core/... — 36 new tests, all passing
  • golangci-lint run ./graph/callgraph/core/... — 0 issues
  • go build ./... — builds cleanly
  • 100% coverage on all new code in go_stdlib_types.go and new additions to types.go
  • JSON round-trip tests verify snake_case tag names for every multi-word field
  • Table-driven tests cover all nil/missing/found paths for every lookup method
  • Integration test validates end-to-end registry workflow

Dependencies

Prerequisite for:

  • PR-21: Extraction tool (tools/generate_go_stdlib_registry.go)
  • PR-22: Remote loader (registry/go_stdlib_remote.go)
  • PR-23: R2 publishing pipeline

🤖 Generated with Claude Code

@shivasurya shivasurya added enhancement New feature or request go Pull requests that update go code labels Feb 20, 2026
@shivasurya shivasurya self-assigned this Feb 20, 2026
@safedep

This comment was marked as resolved.

@github-actions

Copy link
Copy Markdown

Code Pathfinder Security Scan

Pass Critical High Medium Low Info

No security issues detected.

Metric Value
Files Scanned 3
Rules 38

Powered by Code Pathfinder

@codecov

This comment was marked as resolved.

@shivasurya shivasurya changed the title feat(go): Add Go stdlib registry data structures and types (PR-20) feat(go): Add Go stdlib registry data structures and types (PR-01) Feb 25, 2026

shivasurya commented Feb 25, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • Feb 25, 3:17 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 25, 3:17 AM UTC: @shivasurya merged this pull request with Graphite.

@shivasurya
shivasurya merged commit 8fe4410 into main Feb 25, 2026
12 checks passed
@shivasurya
shivasurya deleted the shiva/go-stdlib-support-pr01 branch February 25, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant