Examples / godoc

Scafld Go API

A live Go API reference generated from Scafld's Go source with native Sourcey godoc support.

Features demonstrated

  • Go package reference from source comments
  • Exported functions, types, methods, and fields
  • Stable package and symbol pages
  • Search and llms-full.txt output
  • Static docs hosted on 0state.com

Scafld is the current live proof for Sourcey’s native godoc support. The Go API reference is generated from the project’s Go source, then published as part of the 0state docs surface.

The important point is not that Sourcey can mirror pkg.go.dev. It should not. The useful thing is that a Go project can own its API reference URLs and keep that reference beside project-level docs, examples, changelog, and agent-readable context.

Source

The source is Scafld’s Go module. Sourcey reads package comments, exported symbols, examples, and module metadata through the Go toolchain. No Doxygen step, XML conversion, or Markdown copy of the API is required.

Output

The generated Go API tab gives Scafld stable package pages and symbol anchors inside the same docs experience as the rest of the project. It also contributes content to search and llms-full.txt, so agents can use the real API surface without reading the repository directly.

Why it matters

For Go projects, pkg.go.dev is a strong global index. It is not a replacement for source-owned product docs. Scafld shows the shape Sourcey is aiming for: native Go reference, generated from source, published as static docs the project controls.

godocgoapi-referencescafld