docs-figures

command
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command docs-figures draws the figures of the documentation. For every figure it writes a pair into docs/diagrams/: a draw.io source (<name>.drawio) and the SVG export of that source (<name>.svg) that the pages embed.

Both files of a pair are rendered from the same elements, so they cannot disagree. A figure is changed by changing its function in one of the fig_*.go files and running the tool again; a hand edit to a generated pair is overwritten on the next run, and the drift test fails it before that. docs/reference/development/diagrams.md is the guide: the inventory of every figure and the page that embeds it, the file-name prefixes, and the visual conventions.

Usage:

go run ./tools/docs-figures            # rewrite every pair
go run ./tools/docs-figures -check     # exit non-zero if a pair is stale
go run ./tools/docs-figures -root DIR  # operate on a tree other than the cwd
go run ./tools/docs-figures -frames    # write the build stages under bin/figure-frames

The frames of a staged figure are for slides, which build a figure up step by step. They are build output, not part of a pair: nothing embeds them in the docs and nothing commits them.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL