textdiff

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package textdiff renders compact, human-readable line diffs.

It lives outside the cli package so that everything presenting a manifest change — the CLI, a TUI view, an API response — renders it identically. The alternative is each caller reimplementing an LCS and drifting from what `swarmcli charts apply --diff` actually prints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lines

func Lines(a, b string) string

Lines returns a compact line-oriented diff of a vs b using a longest common subsequence. Removed lines are prefixed "-", added lines "+", and unchanged lines " ". It is intended for human-readable upgrade previews, not machine patching, so it omits hunk headers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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