message

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package message provides formatted output helpers for the message command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentBlock

func ContentBlock(cmd *cobra.Command, data []byte)

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

func CtxSpecificWarning(cmd *cobra.Command)

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

func EditHint(cmd *cobra.Command)

EditHint prints the edit hint after override creation. Nil cmd is a no-op.

Parameters:

  • cmd: Cobra command for output

func ListHeader

func ListHeader(cmd *cobra.Command)

ListHeader prints the message list table header and separator. Nil cmd is a no-op.

Parameters:

  • cmd: Cobra command for output

func ListRow

func ListRow(cmd *cobra.Command, hook, variant, category string, hasOverride bool)

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

func NoOverride(cmd *cobra.Command, hook, variant string)

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

func OverrideCreated(cmd *cobra.Command, path string)

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

func OverrideRemoved(cmd *cobra.Command, hook, variant string)

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

func SourceDefault(cmd *cobra.Command)

SourceDefault prints the default source header. Nil cmd is a no-op.

Parameters:

  • cmd: Cobra command for output

func SourceOverride

func SourceOverride(cmd *cobra.Command, path string)

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

func TemplateVars(cmd *cobra.Command, vars string)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL