Documentation
¶
Overview ¶
Package drift provides formatted output helpers for the drift command.
Index ¶
- func Archived(cmd *cobra.Command, count int, archiveFile string)
- func BlankLine(cmd *cobra.Command)
- func FixError(cmd *cobra.Command, errMsg string)
- func FixHeader(cmd *cobra.Command)
- func FixMissing(cmd *cobra.Command, file string)
- func FixRecheck(cmd *cobra.Command)
- func FixStaleness(cmd *cobra.Command, file string)
- func FixedCount(cmd *cobra.Command, count int)
- func OtherBlock(cmd *cobra.Command, items []string)
- func PassedHeading(cmd *cobra.Command, count int)
- func PassedLine(cmd *cobra.Command, name string)
- func PathRefsBlock(cmd *cobra.Command, items []string)
- func ReportHeader(cmd *cobra.Command)
- func SkipDeadPath(cmd *cobra.Command, file string, line int, path string)
- func SkipSensitiveFile(cmd *cobra.Command, file string)
- func SkipStaleAge(cmd *cobra.Command, file string)
- func SkippedCount(cmd *cobra.Command, count int)
- func StalenessBlock(cmd *cobra.Command, items []string)
- func StatusOK(cmd *cobra.Command)
- func StatusViolation(cmd *cobra.Command)
- func StatusWarning(cmd *cobra.Command)
- func ViolationLine(cmd *cobra.Command, line string)
- func ViolationsHeading(cmd *cobra.Command, count int)
- func WarningsHeading(cmd *cobra.Command, count int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Archived ¶
Archived prints the archive confirmation with task count and archive path. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- count: number of archived tasks
- archiveFile: path to the archive file
func BlankLine ¶
BlankLine prints a blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func FixError ¶
FixError prints a fix error message. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- errMsg: error message string
func FixHeader ¶
FixHeader prints the "Applying fixes..." heading and a trailing blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func FixMissing ¶
FixMissing prints a fix result for a created missing file. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- file: file that was created
func FixRecheck ¶
FixRecheck prints the "Re-checking..." message with a leading blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func FixStaleness ¶
FixApplied prints a fix result for a successfully fixed issue. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- file: file that was fixed
func FixedCount ¶
FixedCount prints the number of issues fixed. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- count: number of fixed issues
func OtherBlock ¶
OtherBlock prints the other warnings category label followed by each item line and a trailing blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- items: pre-formatted other warning lines
func PassedHeading ¶
PassedHeading prints the passed checks heading with count. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- count: number of passed checks
func PassedLine ¶
PassedLine prints a single passed check entry. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- name: formatted check name
func PathRefsBlock ¶
PathRefsBlock prints the path references category label followed by each item line and a trailing blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- items: pre-formatted path reference lines
func ReportHeader ¶
ReportHeader prints the drift report heading, separator, and trailing blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func SkipDeadPath ¶
SkipDeadPath prints a skip message for a dead path reference. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- file: file containing the dead path
- line: line number
- path: the dead path
func SkipSensitiveFile ¶
SkipSensitiveFile prints a skip message for a sensitive file violation. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- file: file flagged as sensitive
func SkipStaleAge ¶
SkipStaleAge prints a skip message for a stale file age warning. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- file: file with stale age
func SkippedCount ¶
SkippedCount prints the number of issues skipped. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- count: number of skipped issues
func StalenessBlock ¶
StalenessBlock prints the staleness category label followed by each item line and a trailing blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- items: pre-formatted staleness lines
func StatusOK ¶
StatusOK prints the OK status verdict with leading blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func StatusViolation ¶
StatusViolation prints the violation status verdict with leading blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func StatusWarning ¶
StatusWarning prints the warning status verdict with leading blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
func ViolationLine ¶
ViolationLine prints a single violation entry. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- line: pre-formatted violation line
func ViolationsHeading ¶
ViolationsHeading prints the violations section heading with count and a trailing blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- count: number of violations
func WarningsHeading ¶
WarningsHeading prints the warnings section heading with count and a trailing blank line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output
- count: number of warnings
Types ¶
This section is empty.