Documentation
¶
Overview ¶
Design: docs/architecture/config/syntax.md — stdin ("-") wiring for config editor commands Overview: main.go — dispatch and exit codes
Design: docs/architecture/config/syntax.md — config CLI commands Detail: cmd_edit.go — edit subcommand handler Detail: cmd_validate.go — validate subcommand handler Detail: cmd_migrate.go — migrate subcommand handler Detail: cmd_fmt.go — fmt subcommand handler Detail: cmd_dump.go — dump subcommand handler Detail: cmd_diff.go — diff subcommand handler Detail: cmd_completion.go — completion query handler Detail: cmd_history.go — history subcommand handler Detail: cmd_rollback.go — rollback subcommand handler Detail: cmd_set.go — set subcommand handler Detail: cmd_archive.go — archive subcommand handler Detail: cmd_import.go — import subcommand handler Detail: cmd_rename.go — rename subcommand handler
Package config provides the ze config subcommand.
Design: docs/architecture/api/commands.md — config command ownership
Register the `config` root command and its `show config *` / `validate config` offline shortcuts with the importable command registry. This is the owner package: the offline configuration CLI lives with internal/component/config, not under cmd/ze.
The root command and the snapshot shortcuts (history, ls, cat) need the blob store, which is opened only after global flag parsing. The root handler receives it through the RuntimeContext; the local shortcuts (which have the func(args)int signature and so get no context) resolve it lazily through the registry's runtime storage resolver, which cmd/ze/main.go installs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrOldConfig = errors.New("config needs migration")
ErrOldConfig is returned when fmt is called on an old config.
Functions ¶
func ConfigFmtBytes ¶
ConfigFmtBytes formats config bytes and returns formatted output and whether changes were made. Exported for testing.
func Run ¶
Run executes the config subcommand with filesystem storage (backward compat). Returns exit code.
func RunWithStorage ¶
RunWithStorage executes the config subcommand with the given storage backend. Returns exit code.
func ValidateContent ¶
ValidateContent runs the same validation as `ze config validate` and returns an error containing all validation errors. Warnings do not fail validation, matching the CLI command exit-code semantics.
Types ¶
This section is empty.