Help us shape the future of Go! Take the 2026 Go Developer Survey

copygen

command
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Command copygen turns internal/templates/copy.toml into per-package string constants: each top-level table of the file names a package directory relative to the repository root, and the command writes that package's zz_consts.go. The directive in internal/templates/templates.go names it.

Nothing runs it on its own: no build step, no workflow, no test. After editing copy.toml, run `go generate ./internal/templates` from the repository root and commit every regenerated zz_consts.go together with the edit. The test in copygen_test.go regenerates the constants in memory and fails when a committed file no longer matches copy.toml, which is how a missed regeneration shows up.

Jump to

Keyboard shortcuts

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