Documentation
¶
Overview ¶
Package godoc implements the godoc tool: query the local Go documentation for a package or symbol via `go doc -short`. Acts as a stdlib/module API oracle so small models don't hallucinate function names. Session 5e20f3f8 burned a build cycle on a phantom `transform.TrimSpace` — querying `godoc golang.org/x/text/transform` first would have shown the real surface (`Append`, `Bytes`, `String`, ...).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
Tool runs `go doc` against the active Go toolchain. cwd is bee's cwd so module-local imports resolve against the user's project go.mod.
func (*Tool) Run ¶
Run shells out to `go doc`. Combined stdout+stderr returned. Truncated at maxOutputBytes so a `go doc <huge-pkg>` can't blow tiny-profile context.
Hard timeout: 5s. `go doc` is local and fast; a slow run usually means a fetch attempt for a missing module, which we'd rather fail than hang on.