Documentation
¶
Overview ¶
Package sync provides formatted output helpers for the sync command.
Index ¶
- func CtxSyncAction(cmd *cobra.Command, index int, actionType, description, suggestion string)
- func CtxSyncHeader(cmd *cobra.Command, dryRun bool)
- func CtxSyncInSync(cmd *cobra.Command)
- func CtxSyncSummary(cmd *cobra.Command, count int, dryRun bool)
- func DryRun(cmd *cobra.Command, sourcePath, mirrorPath string, hasDrift bool)
- func ErrAutoMemoryNotActive(cmd *cobra.Command, cause error)
- func Result(cmd *cobra.Command, sourceLabel, mirrorPath, sourcePath, archivedTo string, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CtxSyncAction ¶
CtxSyncAction prints a single sync action item with optional suggestion.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- index: 1-based action number.
- actionType: Action type label (e.g. "DEPS", "CONFIG").
- description: Action description.
- suggestion: Optional suggestion text (empty string skips).
func CtxSyncHeader ¶
CtxSyncHeader prints the sync analysis heading and optional dry-run notice.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- dryRun: If true, includes the dry-run notice.
func CtxSyncInSync ¶
CtxSyncInSync prints the all-clear message when context is in sync.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
func CtxSyncSummary ¶
CtxSyncSummary prints the sync summary with item count.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- count: Number of sync items found.
- dryRun: If true, shows the dry-run variant.
func DryRun ¶
DryRun prints the full dry-run plan block: header, source path, mirror path, and drift status.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- sourcePath: absolute path to MEMORY.md.
- mirrorPath: relative mirror path.
- hasDrift: whether the source has changed since last sync.
func ErrAutoMemoryNotActive ¶
ErrAutoMemoryNotActive prints an informational stderr message when auto memory discovery fails.
Parameters:
- cmd: Cobra command whose stderr stream receives the message. Nil is a no-op.
- cause: the discovery error to display.
func Result ¶
func Result( cmd *cobra.Command, sourceLabel, mirrorPath, sourcePath, archivedTo string, sourceLines, mirrorLines int, )
Result prints the full sync result block: optional archive notice, synced confirmation, source path, line counts, and optional new content.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- sourceLabel: source label (e.g. "MEMORY.md").
- mirrorPath: relative mirror path.
- sourcePath: absolute source path for display.
- archivedTo: archive basename, or empty if no archive was created.
- sourceLines: current source line count.
- mirrorLines: previous mirror line count.
Types ¶
This section is empty.