pad

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

Documentation

Overview

Package pad provides terminal output functions for the pad command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlobShow

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

BlobShow prints raw blob data to stdout.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • data: Raw blob bytes.

func BlobWritten

func BlobWritten(cmd *cobra.Command, size int, path string)

BlobWritten prints confirmation that a blob was written to a file.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • size: number of bytes written.
  • path: output file path.

func Empty

func Empty(cmd *cobra.Command)

Empty prints the message when the scratchpad has no entries.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.

func EntryAdded

func EntryAdded(cmd *cobra.Command, n int)

EntryAdded prints confirmation that a pad entry was added.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • n: entry number (1-based).

func EntryList

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

EntryList prints a formatted pad list item.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • line: Pre-formatted list item string.

func EntryMoved

func EntryMoved(cmd *cobra.Command, from, to int)

EntryMoved prints confirmation that a pad entry was moved.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • from: source position (1-based).
  • to: destination position (1-based).

func EntryRemoved

func EntryRemoved(cmd *cobra.Command, n int)

EntryRemoved prints confirmation that a pad entry was removed.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • n: entry number (1-based).

func EntryShow

func EntryShow(cmd *cobra.Command, entry string)

EntryShow prints a pad entry with a trailing newline.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • entry: Entry text.

func EntryUpdated

func EntryUpdated(cmd *cobra.Command, n int)

EntryUpdated prints confirmation that a pad entry was updated.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • n: entry number (1-based).

func ErrExportWrite

func ErrExportWrite(cmd *cobra.Command, label string, cause error)

ErrExportWrite prints a blob write failure to stderr.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • label: blob label.
  • cause: the write error.

func ErrImportBlobSkipped

func ErrImportBlobSkipped(cmd *cobra.Command, name string, cause error)

ErrImportBlobSkipped prints a skipped blob to stderr.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • name: filename.
  • cause: the error reason.

func ErrImportBlobTooLarge

func ErrImportBlobTooLarge(cmd *cobra.Command, name string, max int)

ErrImportBlobTooLarge prints a too-large blob skip to stderr.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • name: filename.
  • max: maximum allowed size in bytes.

func ErrImportCloseWarning

func ErrImportCloseWarning(cmd *cobra.Command, name string, cause error)

ErrImportCloseWarning prints a file close warning to stderr.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • name: filename.
  • cause: the close error.

func ExportDone

func ExportDone(cmd *cobra.Command, label string)

ExportDone prints a successfully exported blob line.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • label: blob label.

func ExportPlan

func ExportPlan(cmd *cobra.Command, label, outPath string)

ExportPlan prints a dry-run export line.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • label: blob label.
  • outPath: target file path.

func ExportSummary

func ExportSummary(cmd *cobra.Command, count int, dryRun bool)

ExportSummary prints the export summary or "no blobs" message.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • count: number of blobs exported.
  • dryRun: whether this was a dry run.

func ImportBlobAdded

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

ImportBlobAdded prints a successfully imported blob line.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • name: filename of the imported blob.

func ImportBlobSummary

func ImportBlobSummary(cmd *cobra.Command, added, skipped int)

ImportBlobSummary prints the blob import summary or "no files" message.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • added: number of blobs imported.
  • skipped: number of blobs skipped.

func ImportDone

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

ImportDone prints the successful line import count.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • count: number of entries imported.

func ImportNone

func ImportNone(cmd *cobra.Command)

ImportNone prints the message when no entries were found to import.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.

func InfoPathConversionExists

func InfoPathConversionExists(
	cmd *cobra.Command, rootDir, oldPath, newPath string,
)

InfoPathConversionExists reports that a pad export target already exists and will be written with a timestamped alternative name.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • rootDir: export destination directory.
  • oldPath: original blob label.
  • newPath: timestamped alternative name joined with rootDir.

func KeyCreated

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

KeyCreated prints a key creation notice to stderr.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • path: key file path.

func MergeAdded

func MergeAdded(cmd *cobra.Command, display, file string)

MergeAdded prints a newly added entry line during merge.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • display: entry display string.
  • file: source file path.

func MergeBinaryWarning

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

MergeBinaryWarning prints a binary data warning for a source file.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • file: source file path.

func MergeBlobConflict

func MergeBlobConflict(cmd *cobra.Command, label string)

MergeBlobConflict prints a blob label conflict warning.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • label: conflicting blob label.

func MergeDupe

func MergeDupe(cmd *cobra.Command, display string)

MergeDupe prints a duplicate-skipped line during merge.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • display: entry display string.

func MergeSummary

func MergeSummary(cmd *cobra.Command, added, dupes int, dryRun bool)

MergeSummary prints the merge summary based on counts and mode.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • added: number of entries added.
  • dupes: number of duplicates skipped.
  • dryRun: whether this was a dry run.

func ResolveSide

func ResolveSide(cmd *cobra.Command, side string, entries []string)

ResolveSide prints a conflict side block: header and numbered entries.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • side: label ("OURS" or "THEIRS").
  • entries: display strings for each entry.

Types

This section is empty.

Jump to

Keyboard shortcuts

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