drift

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: 4 Imported by: 0

Documentation

Overview

Package drift provides formatted output helpers for the drift command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archived

func Archived(cmd *cobra.Command, count int, archiveFile string)

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

func BlankLine(cmd *cobra.Command)

BlankLine prints a blank line. Nil cmd is a no-op.

Parameters:

  • cmd: Cobra command for output

func FixError

func FixError(cmd *cobra.Command, errMsg string)

FixError prints a fix error message. Nil cmd is a no-op.

Parameters:

  • cmd: Cobra command for output
  • errMsg: error message string

func FixHeader

func FixHeader(cmd *cobra.Command)

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

func FixMissing(cmd *cobra.Command, file string)

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

func FixRecheck(cmd *cobra.Command)

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

func FixStaleness(cmd *cobra.Command, file string)

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

func FixedCount(cmd *cobra.Command, count int)

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

func OtherBlock(cmd *cobra.Command, items []string)

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

func PassedHeading(cmd *cobra.Command, count int)

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

func PassedLine(cmd *cobra.Command, name string)

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

func PathRefsBlock(cmd *cobra.Command, items []string)

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

func ReportHeader(cmd *cobra.Command)

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

func SkipDeadPath(cmd *cobra.Command, file string, line int, path string)

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

func SkipSensitiveFile(cmd *cobra.Command, file string)

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

func SkipStaleAge(cmd *cobra.Command, file string)

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

func SkippedCount(cmd *cobra.Command, count int)

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

func StalenessBlock(cmd *cobra.Command, items []string)

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

func StatusOK(cmd *cobra.Command)

StatusOK prints the OK status verdict with leading blank line. Nil cmd is a no-op.

Parameters:

  • cmd: Cobra command for output

func StatusViolation

func StatusViolation(cmd *cobra.Command)

StatusViolation prints the violation status verdict with leading blank line. Nil cmd is a no-op.

Parameters:

  • cmd: Cobra command for output

func StatusWarning

func StatusWarning(cmd *cobra.Command)

StatusWarning prints the warning status verdict with leading blank line. Nil cmd is a no-op.

Parameters:

  • cmd: Cobra command for output

func ViolationLine

func ViolationLine(cmd *cobra.Command, line string)

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

func ViolationsHeading(cmd *cobra.Command, count int)

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

func WarningsHeading(cmd *cobra.Command, count int)

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.

Jump to

Keyboard shortcuts

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