Documentation
¶
Overview ¶
Package startup is what every command does before its own work: load the typed configuration, build the redacting logger from it and make that logger the log/slog default, so no line written by the command or a library bypasses the masking of personal data (ADR 0002).
A configuration that cannot be used stops the command before anything else runs, with a non-zero exit code and an error that never quotes a secret.
Every command logs to standard error: the MCP stdio transport allows a server to log there and reserves standard output for protocol messages (MCP specification 2025-06-18, Transports, stdio). The other commands follow for consistency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(name string, lookup func(string) (string, bool), w io.Writer, run func(config.Config) error) int
Run sets the command name up and runs it: it loads the configuration with lookup, such as os.LookupEnv, makes a redacting logger writing JSON lines to w the slog default and calls run. It returns the process exit code: 0 when run succeeds, 1 after logging the error otherwise. run is not called when the configuration is invalid.
Types ¶
This section is empty.