Documentation
¶
Overview ¶
Package merge reads scratchpad files with automatic decryption fallback and merges entries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBlobLabelMap ¶
BuildBlobLabelMap creates a map of blob labels to their full entry strings.
Parameters:
- entries: scratchpad entries to scan.
Returns:
- map[string]string: blob label to full entry string.
func HasBinaryEntries ¶
HasBinaryEntries checks if any entries contain non-UTF-8 bytes.
Parameters:
- entries: the parsed entries to check.
Returns:
- bool: true if any entry contains non-UTF-8 data.
func HasBlobConflict ¶
HasBlobConflict checks if a blob entry has the same label as an existing blob but different content. Updates the label map with the new entry.
Parameters:
- entry: the new entry to check.
- blobLabels: map of existing blob labels to their full entry strings.
Returns:
- bool: true if a conflict was detected.
- string: the conflicting label (empty if no conflict).
func LoadMergeKey ¶
LoadMergeKey loads the encryption key for merge input decryption.
Parameters:
- keyFile: explicit key file path (empty string = use project key).
Returns:
- []byte: the loaded key, or nil if no key is available.
func ReadFileEntries ¶
ReadFileEntries reads a scratchpad file, attempting decryption first.
Parameters:
- path: path to the scratchpad file.
- key: encryption key (nil to skip the decryption attempt).
Returns:
- []string: parsed entries.
- error: non-nil if the file cannot be read.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.