gen

command
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Command gen scans the repository for example_*_test.go files that carry an "iceberg:doc" metadata block and regenerates the Concepts section of the mdbook website.

A publishable example file looks like:

// iceberg:doc
// title: Multi-Table Transactions
// section: Transactions
// order: 10
// slug: multi-table-transactions
//
// Prose describing the concept...
package catalog_test

// ANCHOR: example
func Example_multiTable() { ... }
// ANCHOR_END: example

Each matching file produces website/src/concepts/<slug>.md. The code blocks are emitted as mdbook "{{#include file:anchor}}" directives, so mdbook pulls the latest source at build time. The generator also rewrites the block between "<!-- GEN:START concepts -->" and "<!-- GEN:END -->" in website/src/SUMMARY.md.

Run from the repo root:

go run ./website/gen

Jump to

Keyboard shortcuts

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