diff

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HighlightUnifiedDiff

func HighlightUnifiedDiff(unifiedDiff string, enabled bool) string

HighlightUnifiedDiff applies terminal colors to a unified diff without changing its text shape.

func UnifiedDiff

func UnifiedDiff(fromName, toName string, fromData, toData []byte) string

UnifiedDiff returns a unified diff-like text using a line-oriented go-diff comparison.

Types

type DiffResult

type DiffResult struct {
	Diff      string
	Different bool
}

DiffResult describes a plaintext-vs-decrypted comparison.

func PlaintextAgainstEncrypted

func PlaintextAgainstEncrypted(opts Options) (DiffResult, error)

type Options

type Options struct {
	PlaintextFile  string
	EncryptedFile  string
	KeyFile        string
	FormatOverride string
	Verbose        bool
}

DiffPlaintextAgainstEncrypted compares an existing plaintext file with the decrypted encrypted file without writing decrypted content to disk.

Jump to

Keyboard shortcuts

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