Documentation
¶
Overview ¶
Package migrationsink is the leaf holding the §1.8 one-time-migration signal. It has no internal dependencies so both internal/keychain (the recorder) and internal/output (the JSON splicer) can import it without an import cycle — gro has no global JSON state, and the migration fires deep inside keychain.Open(), so the signal is recorded here run-scoped and delivered at output time (JSON splice) or flushed to stderr by root.runRoot. Consume-once, so it appears exactly once and never leaks into a later response or a parallel test.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlushMigrationNotice ¶
FlushMigrationNotice emits the §1.8 human line to w iff a record is still pending (no JSON path consumed it), then consumes it. Wired once as a deferred call in root.runRoot so it fires on success AND error, above the os.Exit trap. Writing to stderr never corrupts a --json stdout body.
func Record ¶
func Record(block interface{}, humanLine string)
Record stores the §1.8 block (anything that marshals to the `_migration` value, e.g. credstore.MigrationBlock) plus the human line for the stderr path. Never calling this means "no migration this run".
Types ¶
This section is empty.