Documentation
¶
Overview ¶
Command compdoc extracts the usage documentation of the component pages of the Tango documentation site: for every component of the live catalog it reports the public entry points (constructor signatures and doc comments), the builder types they return with all their exported methods, the exported fields of struct types taken as parameters, and the Go source of every gallery demo of the component. It uses only the standard library (go/build, go/parser, go/ast, go/doc).
go run ./site/tools/compdoc -root . < catalog.json > component-docs.json
The input is the component catalog written by site/tools/build-playground.mjs ({components: [{id, names, demos}], demos: [{name, title, source, line}]}); the output is described by the output type below. Files are selected with the darwin/arm64 build constraints, as site/tools/apigen does, so the signatures match the API reference pages.