Documentation
¶
Overview ¶
Package pad provides terminal output functions for the pad command.
Index ¶
- func BlobShow(cmd *cobra.Command, data []byte)
- func BlobWritten(cmd *cobra.Command, size int, path string)
- func Empty(cmd *cobra.Command)
- func EntryAdded(cmd *cobra.Command, n int)
- func EntryList(cmd *cobra.Command, line string)
- func EntryMoved(cmd *cobra.Command, from, to int)
- func EntryRemoved(cmd *cobra.Command, n int)
- func EntryShow(cmd *cobra.Command, entry string)
- func EntryUpdated(cmd *cobra.Command, n int)
- func ErrExportWrite(cmd *cobra.Command, label string, cause error)
- func ErrImportBlobSkipped(cmd *cobra.Command, name string, cause error)
- func ErrImportBlobTooLarge(cmd *cobra.Command, name string, max int)
- func ErrImportCloseWarning(cmd *cobra.Command, name string, cause error)
- func ExportDone(cmd *cobra.Command, label string)
- func ExportPlan(cmd *cobra.Command, label, outPath string)
- func ExportSummary(cmd *cobra.Command, count int, dryRun bool)
- func ImportBlobAdded(cmd *cobra.Command, name string)
- func ImportBlobSummary(cmd *cobra.Command, added, skipped int)
- func ImportDone(cmd *cobra.Command, count int)
- func ImportNone(cmd *cobra.Command)
- func InfoPathConversionExists(cmd *cobra.Command, rootDir, oldPath, newPath string)
- func KeyCreated(cmd *cobra.Command, path string)
- func MergeAdded(cmd *cobra.Command, display, file string)
- func MergeBinaryWarning(cmd *cobra.Command, file string)
- func MergeBlobConflict(cmd *cobra.Command, label string)
- func MergeDupe(cmd *cobra.Command, display string)
- func MergeSummary(cmd *cobra.Command, added, dupes int, dryRun bool)
- func ResolveSide(cmd *cobra.Command, side string, entries []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlobShow ¶
BlobShow prints raw blob data to stdout.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- data: Raw blob bytes.
func BlobWritten ¶
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 ¶
Empty prints the message when the scratchpad has no entries.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
func EntryAdded ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
ExportDone prints a successfully exported blob line.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- label: blob label.
func ExportPlan ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
ImportNone prints the message when no entries were found to import.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
func InfoPathConversionExists ¶
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 ¶
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 ¶
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 ¶
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 ¶
MergeBlobConflict prints a blob label conflict warning.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- label: conflicting blob label.
func MergeDupe ¶
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 ¶
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.
Types ¶
This section is empty.