Files
archie/configtemplate.go
T
sam 14be7c5567 feat: embed config.example.toml and add comment-preserving TOML writer
Groundwork for archied setup owning config generation (archie-core-ewk),
so install.sh stops emitting a second copy of the config that drifts from
the example operators actually read.

configtemplate lives at the module root because go:embed cannot reach
outside its own directory and config.example.toml is kept at the root
where it is easy to hand-edit. tomlwrite applies setup answers to that
template in place, preserving the comments that make the generated file
readable - BurntSushi/toml round-trips values but not comments, so
re-encoding a decoded document would strip them.
2026-07-30 02:24:20 +10:00

17 lines
632 B
Go

// Package configtemplate embeds config.example.toml so archied setup can
// generate a first-run config.toml from the exact file operators already
// read as documentation, instead of a second copy that can drift from it.
//
// It lives at the module root, rather than under internal/, because
// go:embed patterns cannot reach outside the directory of the .go file
// that declares them, and config.example.toml is kept at the root where
// it is easy to find and hand-edit.
package configtemplate
import _ "embed"
// Example is the verbatim contents of config.example.toml.
//
//go:embed config.example.toml
var Example []byte