diff options
| author | 2026-03-06 11:17:28 +0800 | |
|---|---|---|
| committer | 2026-03-06 11:17:28 +0800 | |
| commit | 5da80869bce6a40584de32d8c18e10411b93db63 (patch) | |
| tree | 2c3bdcdff1ae5d7c653dc536c02c0e5241bf3529 /diff/lines/chunk.go | |
| parent | format/pack/ingest: Split files (diff) | |
| signature | No signature | |
diff/lines: Split files
Diffstat (limited to 'diff/lines/chunk.go')
| -rw-r--r-- | diff/lines/chunk.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/diff/lines/chunk.go b/diff/lines/chunk.go new file mode 100644 index 00000000..b5856d29 --- /dev/null +++ b/diff/lines/chunk.go @@ -0,0 +1,20 @@ +package lines + +// Chunk represents a contiguous region of lines categorized +// as unchanged, deleted, or added. +type Chunk struct { + Kind ChunkKind + Data []byte +} + +// ChunkKind enumerates the type of diff chunk. +type ChunkKind int + +const ( + // ChunkKindUnchanged represents an unchanged diff chunk. + ChunkKindUnchanged ChunkKind = iota + // ChunkKindDeleted represents a deleted diff chunk. + ChunkKindDeleted + // ChunkKindAdded represents an added diff chunk. + ChunkKindAdded +) |
