Documentation
¶
Overview ¶
Package message provides formatted output helpers for the message command.
Index ¶
- func ContentBlock(cmd *cobra.Command, data []byte)
- func CtxSpecificWarning(cmd *cobra.Command)
- func EditHint(cmd *cobra.Command)
- func ListHeader(cmd *cobra.Command)
- func ListRow(cmd *cobra.Command, hook, variant, category string, hasOverride bool)
- func NoOverride(cmd *cobra.Command, hook, variant string)
- func OverrideCreated(cmd *cobra.Command, path string)
- func OverrideRemoved(cmd *cobra.Command, hook, variant string)
- func SourceDefault(cmd *cobra.Command)
- func SourceOverride(cmd *cobra.Command, path string)
- func TemplateVars(cmd *cobra.Command, vars string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentBlock ¶
ContentBlock prints raw content with a leading blank line. If the content does not end with a newline, an extra newline is appended. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- data: raw content bytes to display
func CtxSpecificWarning ¶
CtxSpecificWarning prints the ctx-specific category warning followed by an empty line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func EditHint ¶
EditHint prints the edit hint after override creation. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func ListHeader ¶
ListHeader prints the message list table header and separator. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func ListRow ¶
ListRow prints a single message list table row. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- hook: hook name
- variant: variant name
- category: message category
- hasOverride: whether a custom override exists
func NoOverride ¶
NoOverride prints a message indicating no override exists. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- hook: hook name
- variant: variant name
func OverrideCreated ¶
OverrideCreated prints the override file creation confirmation. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- path: absolute path to the created override file
func OverrideRemoved ¶
OverrideRemoved prints the override removal confirmation. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- hook: hook name
- variant: variant name
func SourceDefault ¶
SourceDefault prints the default source header. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func SourceOverride ¶
SourceOverride prints the override source header with the file path. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- path: path to the override file
func TemplateVars ¶
TemplateVars prints a formatted template variables line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- vars: pre-formatted template variables text
Types ¶
This section is empty.