doccheck

command
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Command doccheck builds the Go code in the documentation, so it cannot drift from the API it describes.

Each harness in internal/doccheck/harness is a Go program with markers of the form

// SNIPPETS <file.md> "<heading>"

on a line of their own. doccheck replaces each marker with the ```go blocks of that section of the file — from the heading to the next heading of the same or a higher level — in document order, writes each program to its own module built against this checkout, and vets it. Stubs in a harness stand in for what a document marks as the application's own. Every ```go block in GETTING_STARTED.md and docs/guides must be covered by a marker.

Run it from the repository root:

go run ./internal/doccheck

Jump to

Keyboard shortcuts

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