Documentation
¶
Overview ¶
Package node defines the core data types for diff results.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeKind ¶
type ChangeKind int
ChangeKind classifies a line or structural element.
const ( Unchanged ChangeKind = iota Added Removed Modified // structured diffs only (phases 4–6) )
type Diff ¶
type Diff struct {
Format Format
FileA string
FileB string
Hunks []Hunk // populated for text diffs
Root *DiffNode // populated for structured diffs (phases 4–6)
Added int
Removed int
Modified int // structured diffs only
}
Diff is the top-level result returned by all parse functions.
type DiffNode ¶
type DiffNode struct {
Kind ChangeKind
Path string // e.g. ".users[0].name"
Key string
Index int // -1 if not an array element
OldValue string // raw leaf value
NewValue string
Children []*DiffNode
}
DiffNode represents a single node in a structured diff tree (phases 4–6).
Click to show internal directories.
Click to hide internal directories.