Documentation
¶
Overview ¶
go-apiuse-ingest walks one or more Go source trees, resolves the callee of every function call, extracts a canonical call-shape for each, and writes a gob-encoded index.bin suitable for consumption by the goapiuse runtime library.
Usage:
go-apiuse-ingest -o index.bin -source "corpus snapshot 2026-04-24" dir1 dir2 ...
Each positional argument must be a directory that contains Go source. The tool invokes golang.org/x/tools/go/packages with NeedSyntax + NeedTypes + NeedTypesInfo, then walks every *ast.CallExpr and records a (qualified-callee, shape) pair. Shapes are clustered by identity string and converted to frequencies on write.
When type-checking fails for a package, the tool emits a structured warning to stderr and continues with the packages it did resolve. The exit code is non-zero only if every package failed.